This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: -Werror macro
- From: "Bruno Moreira Guedes" <thbmatrix at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Sun, 25 May 2008 22:27:28 -0300
- Subject: Re: -Werror macro
- References: <1211720944.24822.ezmlm@gcc.gnu.org> <4839BC84.9050705@duaneellis.com>
2008/5/25 Duane Ellis <duane@duaneellis.com>:
> bruno> How could I know if -Werror is set?? Is there some macro set when
> it's
> bruno> used or not?? I want to 'force' the use of -Werror when compiling
> sources
> bruno> which include some headers.
>
> rkiesling> I had been planning such a feature in ctpp (shamless OT plug,
> I know),
> rkiesling> but there hasn't been any demand so far.
>
> I too would like this feature in GCC... along with an number of other
> warning flags
> ie: -Wmissing-prototypes, -Wstrict-prototypes etc....
>
> I would like to do something like this:
>
> #if !defined(_GCC_Werror_defined)
> #error Project policy and procedure requires GNU GCC -Werror be enable.
> #endif
>
> -Duane.
>
>
>
>
Yes Duane, it's so interesting!!
And I also think it's easy to implement.
But the problem: it'll made our source less portable...
[]'s