demand_empty_rest_of_line and ignore_rest_of_line

Richard Earnshaw Richard.Earnshaw@arm.com
Tue Apr 27 11:43:00 GMT 2004


On Tue, 2004-04-27 at 04:39, Ian Lance Taylor wrote:
> You left
> out the truly dreadful ARM .symver, in which '@' starts a comment at
> any time--except when it appears in the operand of .symver.  And,
> repeating myself, MRI mode.

I'd dearly like to deprecate use of '@' as a comment char, but it's not
trivial.  There simply is no single char in ASCII (with the possible
exception of '`') that can be used as a substitute and that doesn't have
other uses in the syntax.

One possibility would be to adopt a 2-character sequence (such as '//'),
and to that extent I notice that there is already code in the parser to
handle this.

However, there's still the legacy issue.  Old versions of gcc generate @
in abundance, and there is substantial hand-written assembly code out
there that does similarly.  One way of addressing this might be to
reject '@' in the EABI conforming modes -- it provides a relatively
clean cut-off point.  Can the selection of comment characters be made
command-line option dependent?

R.



More information about the Binutils mailing list