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: [C PATCH] Warn if switch has boolean value (PR c/60439)


On Fri, Apr 18, 2014 at 7:30 AM, Marek Polacek wrote:
> +         if (TREE_CODE (type) == BOOLEAN_TYPE
> +             || exp_code == TRUTH_ANDIF_EXPR
> +             || exp_code == TRUTH_AND_EXPR
> +             || exp_code == TRUTH_ORIF_EXPR
> +             || exp_code == TRUTH_OR_EXPR
> +             || exp_code == TRUTH_XOR_EXPR
> +             || exp_code == TRUTH_NOT_EXPR
> +             || exp_code == EQ_EXPR
> +             || exp_code == NE_EXPR
> +             || exp_code == LE_EXPR
> +             || exp_code == GE_EXPR
> +             || exp_code == LT_EXPR
> +             || exp_code == GT_EXPR)

Is there a TREE_CODE_CLASS or a #define for this?

Ciao!
Steven


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