http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60978
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |manu at gcc dot gnu.org --- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- I don't even understand what this code is trying to warn about: if (TREE_CODE (arg2_type) == ENUMERAL_TYPE && TREE_CODE (arg3_type) == ENUMERAL_TYPE) { if (TREE_CODE (orig_arg2) == CONST_DECL && TREE_CODE (orig_arg3) == CONST_DECL && DECL_CONTEXT (orig_arg2) == DECL_CONTEXT (orig_arg3)) /* Two enumerators from the same enumeration can have different types when the enumeration is still being defined. */; else if (complain & tf_warning) warning_at (loc, OPT_Wenum_compare, "enumeral mismatch in " "conditional expression: %qT vs %qT", arg2_type, arg3_type); } What is the DECL_CONTEXT check doing there?