This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: is there a command-line flag I can pass GCC to stop bitching about #pragma once?
- From: "Rupert Wood" <me at rupey dot net>
- To: "'Rob Newberry'" <robnewberry at grouplogic dot com>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: Thu, 1 Aug 2002 09:25:10 +0100
- Subject: 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.