public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* dwarf2out.c/ASM_OUTPUT_ASCII,ASM_OUTPUT_DWARF_STRING
@ 1997-12-01  2:59 Philippe De Muyter
  1997-12-01  6:13 ` dwarf2out.c/ASM_OUTPUT_ASCII,ASM_OUTPUT_DWARF_STRING Jeffrey A Law
  0 siblings, 1 reply; 3+ messages in thread
From: Philippe De Muyter @ 1997-12-01  2:59 UTC (permalink / raw)
  To: gcc mailing list, egcs mailing list

testgcc-971128 fails for me with :

    ./xgcc -B./ -O2   -DIN_GCC    -O -g -I./include   -g1 -DIN_LIBGCC2
    -D__GCC_FLOAT_NOT_NEEDED -fexceptions  -I.
    -I/share/src/gnu/testgcc-971121 -I/share/src/gnu/testgcc-971121/config \
      -c /share/src/gnu/testgcc-971121/cp/tinfo.cc
    Assembler: tinfo.cc
     aline 885 : Fatal: unknown size specification
     aline 885 : Fatal: syntax error
     aline 885 : Fatal: invalid instruction name

where assembler lin 885 is as follows :

        .ascii "eh\0"   ;# CIE Augmentation

which is output using ASM_OUTPUT_DWARF_STRING (defined in dwarf2out.c)

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 !

The only intended difference between ASM_OUTPUT_DWARF_STRING and
ASM_OUTPUT_ASCII is to not output the final '\n', to be able to put
a comment on the same line, instead of on the next or previous line.
I do not think we should request the about 48 ports that define
ASM_OUTPUT_ASCII to add a definition for ASM_OUTPUT_DWARF_STRING.

If we really need to be able to put a comment on the same line as the string,
perhaps we could modify all the target-dependent ASM_OUTPUT_ASCII macros
to not output the final '\n', modify the documentation for ASM_OUTPUT_ASCII,
and add a '\n' after each invocation of ASM_OUTPUT_ASCII.

But for me, having the comment on the previous or next line is enough.

Philippe

PS : dwarf2out.c in egcs and testgcc are different for no reason :
macro name, assert instead of if () abort(),...

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: dwarf2out.c/ASM_OUTPUT_ASCII,ASM_OUTPUT_DWARF_STRING
  1997-12-01  2:59 dwarf2out.c/ASM_OUTPUT_ASCII,ASM_OUTPUT_DWARF_STRING Philippe De Muyter
@ 1997-12-01  6:13 ` Jeffrey A Law
  1997-12-01  6:46   ` dwarf2out.c/ASM_OUTPUT_ASCII,ASM_OUTPUT_DWARF_STRING Philippe De Muyter
  0 siblings, 1 reply; 3+ messages in thread
From: Jeffrey A Law @ 1997-12-01  6:13 UTC (permalink / raw)
  To: Philippe De Muyter; +Cc: gcc mailing list, egcs mailing list

  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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: dwarf2out.c/ASM_OUTPUT_ASCII,ASM_OUTPUT_DWARF_STRING
  1997-12-01  6:13 ` dwarf2out.c/ASM_OUTPUT_ASCII,ASM_OUTPUT_DWARF_STRING Jeffrey A Law
@ 1997-12-01  6:46   ` Philippe De Muyter
  0 siblings, 0 replies; 3+ messages in thread
From: Philippe De Muyter @ 1997-12-01  6:46 UTC (permalink / raw)
  To: law; +Cc: gcc2, egcs

>   > 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.

Sorry, my wording was not clear enough.  I only meant that I do not see
anything 'experimental' in the differences between the egcs and testgcc
versions of dwarf2out.c, and that it would thus be better if they were
identical.  Can one of the maintainer for gcc/dwarf2out.c update the
testgcc version to be identiacl to the egcs version ?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1997-12-01  6:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-12-01  2:59 dwarf2out.c/ASM_OUTPUT_ASCII,ASM_OUTPUT_DWARF_STRING Philippe De Muyter
1997-12-01  6:13 ` dwarf2out.c/ASM_OUTPUT_ASCII,ASM_OUTPUT_DWARF_STRING Jeffrey A Law
1997-12-01  6:46   ` dwarf2out.c/ASM_OUTPUT_ASCII,ASM_OUTPUT_DWARF_STRING Philippe De Muyter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).