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]

Re: preprocessor/7947: cpp0 -std=gnu99 rejects # comments


On Tue, Sep 17, 2002 at 08:22:38PM +0100, Neil Booth wrote:
> Marcus Brinkmann wrote:-
> 
> > That is my fault for not being precise enough in my bug report, sorry.
> > 
> > The problem is that gcc calls the preprocessor with this ordering when
> > compiling an assembler file (foo.S) with the -std=gnu99 option.
> > 
> > Try "echo \# foo > foo.S" and "gcc -std=gnu99 -o foo foo.S", this triggers
> > the bug.  -v shows that gcc passes -std=gnu99 to cpp when preprocessing the
> > file.
> 
> Right, but everything you state is intentional.  -lang-asm deliberately
> comes first, otherwise it would clobber various other flags the user
> may have passed, such as -fdollars-in-identifiers, -trigraphs etc.
> 
> The problem you have is that -std=gnu99 applies to the C language, and
> not to assembler.
> 
> What is the reason you need to pass the switch?  If it's to avoid a
> spurious warning, we may be able to disable the warning if -lang-asm.
> If it's to achieve some additional functionality, we may be able to
> retain that functionality if -lang-asm.

Ayup, I just see my mistake.  We are setting -std=gnu99 in CPPFLAGS, not CFLAGS. 
D'oh!  I will put the blame elsewhere then :)

Thanks a lot for your patience,
Marcus

-- 
`Rhubarb is no Egyptian god.' GNU      http://www.gnu.org    marcus@gnu.org
Marcus Brinkmann              The Hurd http://www.gnu.org/software/hurd/
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de/


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