Name mangling problem in m68k port

Jeffrey A Law
Tue Feb 2 10:03:00 GMT 1999

  In message <>you write:
  > The static data members in this C++ class
  > struct A { static in b; }
  > is mangled as _1A.b when NO_DOLLAR_IN_LABEL is defined (which is by
  > default in config/svr4.h).  This is a problem for m68k targets, because if
  > _1A.b is used as an operand the assembler interprets ".b" as a size suffix
  > (similar for ".w", ".l", ".s").  The workaround is to put the name in
  > parentheses, since these suffixes are only recognized at the end of the
  > whole operand, not inside of it.
The assembler interprets the ".b" as a size directive for the operand?  Weird.

Seems to me a better solution might be to define NO_DOT_IN_LABEL to avoid
the situation entirely.  Is there some reason not to do this?


More information about the Gcc-patches mailing list