dwarf2out.c/ASM_OUTPUT_ASCII,ASM_OUTPUT_DWARF_STRING

Jeffrey A Law law@cygnus.com
Mon Dec 1 06:13:00 GMT 1997


  In message < 199712011058.LAA00466@mail.macqel.be >you write:
  > Testing egcs, I do not get that failure, because one uses there
  > ASM_OUTPUT_ASCII that has been carefully defined by many config files,
  > but one uses it only if flag_debug_asm is not set !
Right.

While it's not the perfect 100% correct solution, it is practical -- very
few people will ever use flag_debug_asm, and those who do are exactly
the people who can (and will) figure out what's going wrong.

  > PS : dwarf2out.c in egcs and testgcc are different for no reason :
  > macro name, assert instead of if () abort(),...
No, it's for a good reason.

Using "assert.h" like the old dwarfout/dwarf2out code is extremely bad.

Consider what happens on systems which have gcc already installed, but
no __eprintf in their existing libgcc.a -- they fail to build because
the dwarf code picks up gcc's assert.h, which references __eprintf,
which doesn't exist in libgcc.a.

jeff



More information about the Gcc mailing list