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: [patch] fix c++/27975, add new warning option -Wenum-compare


Michael Matz <matz@suse.de> writes:

> the bugreport asks for the possibility to disable the warning about 
> comparison of values of different enum types.  The request seems 
> reasonable and I've put it under the control of a new flag -Wenum-compare 
> (only for C++ as only that frontend implements the warning).
>
> Right now it's disabled by default, but we could enable it with -Wall or 
> -Wextra, I'll do whatever is decided.

It seems to me that this option was previously always emitted.  So I
think that -Wenum-compare should be turned on by -Wall.

Also it would be nice to have some test cases.  If you are lucky you
will find an existing test case which used to emit a warning and now
does not.

I'll say OK with -Wall turning on -Wenum-compare and with a test case,
but please give people a day to comment.

Thanks.

Ian


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