https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125020

--- Comment #1 from Heiko Eißfeldt <heiko at hexco dot de> ---
Furthermore looking at the code, it is very unclear to me when this warning is
actually triggered:

gcc/cp/call.cc: lines 6527-6534
          if (complain & tf_warning)
            {
              enum opt_code opt = (warn_enum_conversion
                                   ? OPT_Wenum_conversion
                                   : OPT_Wextra);
              warning_at (loc, opt, "enumerated and "
                          "non-enumerated type in conditional expression");
            }

When -Wextra includes -Wenum_conversion, why the distinction?

gcc/c/c-family/c.opt, lines750-752 has this definition
Wenum-conversion
C ObjC C++ ObjC++ Var(warn_enum_conversion) Init(0) Warning LangEnabledBy(C
ObjC,Wextra)
Warn about implicit conversion of enum types.

which should probably be using
C ObjC C++ ObjC++ Var(warn_enum_conversion) Init(0) Warning EnabledBy(Wextra)

Thanks.

Reply via email to