This is the mail archive of the gcc-help@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: is there a command-line flag I can pass GCC to stop bitching about #pragma once?


Rob Newberry wrote:

> I've got a bunch of code that I need to avoid changing, and it uses 
> #pragma once.  I understand that it's deprecated; but I still need
> to compile it.  Is there something I can pass to GCC so it will still
> issue other warnings, but ignore that one?

No, I'm afraid not. If you're willing to recompile your GCC, you can
remove the warning/error call from the first line do_pragma_once of
gcc/cpplib.c but it isn't controlled by any warning flag.

To my horror, I note that the warning has been upgraded to an error in
the current CVS head (to be GCC 3.3). This, IMO, is plain wrong; if it
absolutely must be warned about, that should be limited to pedantic
mode.

Rup.


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