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: -Wc++-compat: different enums in ?:


On Fri, 19 Jun 2009, Ian Lance Taylor wrote:

> When doing the big -Wc++-compat enum fixes a while back, I overlooked a
> case.  In C++, the ?: operator does not permit the second and third
> operands to have different enum types.  This patch adds a warning for
> this case for -Wc++-compat.  This patch requires approval from the C
> frontend maintainers.
> 
> This patch also fixes the single case in the gcc sources where this
> problem arises.
> 
> Bootstrapped and tested on x86_64-unknown-linux-gnu.  OK for mainline?

The C changes are OK.

-- 
Joseph S. Myers
joseph@codesourcery.com


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