gnu-cpp + /bin/cc = headache
Alex S. Crain
alex at umbc3.UMD.EDU
Fri Oct 28 05:47:32 AEST 1988
With all these binaries running about, I wanted to make sure that
everyone knew this.
gnu-cpp irritates a bug in the stock C compiler, causing -g to
produce bogus line #/file name information in the symbol table. The problem
is that gnu-cpp can emit #line directives on consecutive lines, which confuses
the C compiler.
This bug has no effect on the exectable code, only on the debugging
information. The fix is simple enough, although if you have gcc its sort of
pointless. Simply chage the printf() statements in the cccp.c file from
fprintf(outfile,"# line %d, \"%s\"\n", ... )
to
fprintf(outfile,\n# line %d, \"%s\"\n", ... )
^
add a blank line between #line directives.
Note that this is purely from memory, so the exact syntax may differ. There
are 2 or three instances of this in the cccp.c file.
--
:alex.
Systems Programmer
nerwin!alex at umbc3.umd.edu UMBC
alex at umbc3.umd.edu
More information about the Unix-pc.general
mailing list