This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: -Werror macro
- From: rkiesling <rkiesling at earthlink dot net>
- To: gcc-help at gcc dot gnu dot org
- Date: Sat, 24 May 2008 13:08:29 -0400 (EDT)
- Subject: Re: -Werror macro
- Reply-to: ctalk at ctalklang dot org
Bruno Moreira Guedes:
> How could I know if -Werror is set?? Is there some macro set when it's
> used or not??
The preprocessor does not define builtin macros for its command line
options.
You could, perhaps, use a shell construct to check for the presence
of -Werror on the command line, then set the compiler options
accordingly.
I had been planning such a feature in ctpp (shamless OT plug, I know),
but there hasn't been any demand so far.
HTH
Ctalk Home Page: http://www.ctalklang.org