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 RFA: Avoid enum bitfield in C++ frontend


Dave Korn <dave.korn.cygwin@googlemail.com> writes:

> Andrew Pinski wrote:
>> On Mon, Apr 13, 2009 at 1:39 PM, Ian Lance Taylor <iant@google.com> wrote:
>>> And now with the patch.
>> 
>> How about adding a warning for this case with -Wc++-compat?
>> It seems better to add a warning while also committing this patch.
>
>   OR'ing enums seems even wronger to me than adding arbitrary ints to them.

OR'ing enum constants is permitted in C++, and using enums to define
bitmask values is useful in C.

An optional warning for OR'ing enums in C++ is fine with me if you think
it would be useful, but I don't plan to work on it.

Ian


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