preprocessor behavoir change with -ansi in assembly????

Neil Booth neil@daikokuya.co.uk
Fri Nov 22 13:33:00 GMT 2002


Sean McNeil wrote:-

> OK, I agree.  Yet you can pass all kinds of other flags into gcc that
> are not related to the assembler (-finline for example) and they do not
> affect the way assembly files are parsed.  This, in my opinion, is a
> bug.
> 
> The preprocessor behavior should not change when -ansi is used on an
> assembly file.  I can no longer use the same flags to compile all my
> code since I would have to remove -ansi on commands that process
> assembly files.

-ansi has always meant -std=c89, and the last standard to be specified
is the one that wins.  I believe this has always been the case.

Specifying -lang-asm has to come first, as is implies by the file
extension, otherwise ASM defaults could override things specified
earlier on the command line, which would be a real bug.  -ansi therefore
necessarily comes later, and overrides ther earlier "standard" specified.

I don't intend to change this, as your switches don't imply anything
reasonable, and the work done on command line ordering has fixed
so many minor bugs and other bug reports that I don't want to risk
recreating them again.

Neil.



More information about the Gcc-bugs mailing list