This is the mail archive of the gcc-patches@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: [warning control] New #pragma GCC diagnostic


On Tue, Jan 24, 2006 at 10:13:34AM -0600, Gabriel Dos Reis wrote:
> | drow@nevyn:~% gcc -g -o foo foo.c -c -Wuninitialized -O -Werror -w
> | drow@nevyn:~% echo $?
> | 0
> | 
> | That's what happens today, and it makes total sense to me.  I've asked
> | for the warnings to be inhibited, so they are inhibited, so they aren't
> | treated as errors.

FYI, that's GCC 4.0.

> -Wuninitialized turns on remarks about uninitialized variables as
> warnings.  If you don't want that warning, say -Wno-uninitialized,
> unambiguously: It won't show up neither as warning, nor as an error.
> 
> -Werror says turn warnings into errors.  So anything that is elligible
> to warning status is now promoted to error status.
> 
> -w says don't show anything that retains  warning status.

That's not what the documentation says.  It says "inhibit all warning
messages".  If they're inhibited, how can they be errors?  It's an
incompatible change, and while it makes sense from the interior of the
diagnositics machinery, I maintain that it doesn't make sense from the
user viewpoint.

Also, whether this is a bug or not, there are still some warnings in
GCC that can't be turned off without using -w.  At least there were
last time I checked.

Anyway, I'm not going to convince you if I haven't already.  I'll shut
up.

-- 
Daniel Jacobowitz
CodeSourcery


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