3.6.3.2 Aux-info Option
The -aux-info
option generates function prototypes from
a C module.
The -aux-info main.pro
option, for example, prints to
main.pro
prototyped declarations for all functions declared and/or
defined in the module being compiled, including those in header files. Only one source
file can be specified on the command line when using this option so that the output file
is not overwritten. This option is silently ignored in any language other than C.
The output file also indicates, using comments, the source file and line
number of each declaration, whether the declaration was implicit, prototyped or
unprototyped. This is done by using the codes I
or N
for new-style and O
for old-style (in the first character after the
line number and the colon) and whether it came from a declaration or a definition using
the codes C
or F
(in the following character). In the
case of function definitions, a K&R-style list of arguments followed by their
declarations is also provided inside comments after the declaration.
For example, compiling with the command:
xc8-cc
-mcpu=atmega3290p
-aux-info test.pro test.c
might produce test.pro
containing the following
declarations, which can then be edited as necessary:
/* test.c:2:NC */ extern int add (int, int);
/* test.c:7:NF */ extern int rv (int a); /* (a) int a; */
/* test.c:20:NF */ extern int main (void); /* () */