This is the mail archive of the
mailing list for the binutils project.
Re: Changing GAS for ARM to accept semicolon as a comment character?
- From: Philip Blundell <pb at nexus dot co dot uk>
- To: Nick Clifton <nickc at cambridge dot redhat dot com>
- Cc: binutils at sources dot redhat dot com, linux-arm at lists dot arm dot linux dot org dot uk
- Date: 12 Apr 2002 12:28:48 +0100
- Subject: Re: Changing GAS for ARM to accept semicolon as a comment character?
- References: <firstname.lastname@example.org>
On Fri, 2002-04-12 at 11:53, Nick Clifton wrote:
> GAS for the ARM currently supports ';' as a line separator character
> and '@' as a line comment character. Would anyone object to my
> changing this so that ';' was also a line comment character and
> dropping the support for multiple instructions on a single line ?
> (Or else choosing a different character for a line separator).
> The reason is for compatibility with ARM's assembler which uses ';'
> as the comment character. (It would be nice to drop '@' as a
> comment character since this is used in ELF .section directives, but
> I suspect that there is far too much ARM assembly code out there for
> this to be feasible).
I don't think this would be acceptable.
There is definitely some existing code out there that relies on ";"
being a separator character. But there is no easy way to locate all
this code, and it will quietly start producing wrong answers if ";" is
changed to be a comment character like "@". On the other hand, making
it a line comment character in the same way that "#" currently is might
not be a problem.
Compatibility with the ARM behaviour doesn't seem all that valuable
anyway, given that there are plenty of other syntax differences between
the two assemblers. If you want to be able to assemble ARM source
files, your best option is probably to create a special compatibility
mode (ie something a bit like --mri but perhaps less extensive).