This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/17171] Unrecognized comments in generated asm


------- Additional Comments From wilson at gcc dot gnu dot org  2004-08-26 04:41 -------
Gas makes a distinction between line comment characters, characters that start a
comment if they are the first character or a line, and comment characters,
characters that start a comment anywhere.  Characters which are part of the
assembly syntax can be line comment characters, but not comment characters.

Depending on the configuration, gas supports either / or \ as a prefix
separator.  That is one of "repe/cmpsb" or "repe\cmpsb" will be accepted.  If /
is the prefix separator, then / can be a line comment character, but not a
comment character.  This is the case for aout/coff/linux/netbsd/freebsd and a
few others.

Thus normal gcc comments that start at the beginning of a line can use / as a
line comment character, but the comments emitted by -fverbose-asm which come at
the end can not.

Regardless of how gas is configured, # is always a comment character.  Thus it
is always safe to use # if the target uses gas.  It probably isn't safe to make
the same assumption for other assemblers, even if -fverbose-asm is broken for them.

I have added the patch to mainline.

This was broken in gcc-3.1, when -fverbose-asm was extended to emit asm operand
info after each asm line.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-08-26 04:42:00
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17171


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]