OK.
Jason
On Fri, Sep 19, 2014 at 03:39:39PM -0400, Jason Merrill wrote:
> On 09/19/2014 09:29 AM, Marek Polacek wrote:
> >But we also started to warn on
> >CPP_KEYWORD and two others: "case value not in enumerated type".
> >Fixed by moving CPP_KEYWORD, CPP_TEMPLATE_ID, and CPP_NESTED_NAME_SPECIFIER
> >into
On 09/19/2014 09:29 AM, Marek Polacek wrote:
But we also started to warn on
CPP_KEYWORD and two others: "case value not in enumerated type".
Fixed by moving CPP_KEYWORD, CPP_TEMPLATE_ID, and CPP_NESTED_NAME_SPECIFIER
into enum cpp_ttype. Not sure if this is going to hurt something else.
Wait,
On Fri, Sep 19, 2014 at 11:19:14AM -0400, Jason Merrill wrote:
> On 09/19/2014 09:29 AM, Marek Polacek wrote:
> >- orig_type = TREE_TYPE (cond);
> >+ /* Handle enum bit-fields. */
> >+ tree field;
> >+ if (TREE_CODE (cond) == COMPONENT_REF
> >+ && (field = TREE_OPERAND (co
On 09/19/2014 09:29 AM, Marek Polacek wrote:
- orig_type = TREE_TYPE (cond);
+ /* Handle enum bit-fields. */
+ tree field;
+ if (TREE_CODE (cond) == COMPONENT_REF
+ && (field = TREE_OPERAND (cond, 1))
+ && DECL_BIT_FIELD_TYPE (field)
+ && TREE_CODE (DE
On Fri, Sep 19, 2014 at 03:29:44PM +0200, Marek Polacek wrote:
> Jakub, does the asan.c change look ok?
> --- gcc/gcc/asan.c
> +++ gcc/gcc/asan.c
> @@ -2024,6 +2024,8 @@ maybe_instrument_call (gimple_stmt_iterator *iter)
> case BUILT_IN_TRAP:
> /* Don't instrument these. */
This patch makes -Wswitch{,-enum} work even with enum bit-fields (we got
several bugreports about that).
The problem is that enum e:2; has an integral type with precision 2,
and c_do_switch_warnings doesn't like that:
6195 /* From here on, we only care about about enumerated types. */
6196 if