This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Warnings in the C++ Front-End and GCC in General
- To: manfred at s-direktnet dot de, Manfred dot Hollstein at ks dot sel dot alcatel dot de
- Subject: Re: Warnings in the C++ Front-End and GCC in General
- From: Tim Hollebeek <tim at wagner dot princeton dot edu>
- Date: Tue, 8 Sep 1998 09:23:11 -0400 (EDT)
- Cc: mark at markmitchell dot com, egcs-patches at cygnus dot com, egcs at cygnus dot com, jason at cygnus dot com
Manfred Hollstein writes ...
>
> #ifndef _common_include_file_h
> # define _common_include_file_h
>
> ...
> #pragma gcc_disable_warn (62)
> ...
> #pragma gcc_restore_warn (62)
> ...
> #endif
>
> will then leave the warning flag's status untouched after this file has
> been #include'd.
It doesn't nest.
enter x.h
#pragma disable 62
enter y.h
#pragma disable 62
#pragma restore 62
leave y.h
warning 62! [etc]
#pragma restore 62
leave x.h
also, don't use numbers for the warnings. Completely unreadable and
unmaintainable. In an ideal world, I'd like:
#pragma warnings push
#pragma warnings no-implicit-int no-unused missing-declarations
[...]
#pragma warnings pop
---------------------------------------------------------------------------
Tim Hollebeek | "Everything above is a true
email: tim@wfn-shop.princeton.edu | statement, for sufficiently
URL: http://wfn-shop.princeton.edu/~tim | false values of true."