Look at this example:
#include <stdio.h>
int main (void)
{
printf ("Hello, world!\n"); return 0;
}
It is possible to see the declarations from the included header file by preprocessing the file with gcc -E
:
$ gcc -E hello.c
On a GNU system, this produces output similar to the following:
# 1 "hello.c"
# 1 "/usr/include/stdio.h" 1 3
extern FILE *stdin;
extern FILE *stdout;
extern FILE *stderr;
extern int fprintf (FILE * __stream, const char * __format, ...) ;
extern int printf (const char * __format, ...) ;
// [ ... additional declarations ... ]
# 1 "hello.c" 2
int main (void)
{
printf ("Hello, world!\n");
return 0;
}
I would like to know the meaning of the numbers in the # lines (i.e. #1..., #1 ... 1 3 and #1 ... 2 in the last #).