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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
            Summary|bogus error on attribute    |[7/8/9 Regression] bogus
                   |format with a named         |error on attribute format
                   |constant argument           |with a named constant
                   |                            |argument

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
The error first appeared with r189174 (in GCC 4.8.0):

r189174 | jason | 2012-07-02 15:14:23 -0400 (Mon, 02 Jul 2012) | 20 lines

        PR c++/53524
gcc/cp/
        * call.c (build_conditional_expr_1): Don't warn about comparison of
        two enumerators before their enumeration is complete.
        (build_new_op_1): Call decay_conversion before warn_logical_operator.
        * decl.c (build_enumerator): Set DECL_CONTEXT of an enumerator to
        its enumeration.
        * decl2.c (mark_used): Call used_types_insert for enums.
        * semantics.c (finish_id_expression): Don't decay CONST_DECL.
        (finish_member_declaration): Don't change DECL_CONTEXT of enumerators.
        * class.c (check_field_decls): Don't change DECL_CONTEXT of enums.
        * typeck.c (convert_for_assignment): Don't decay CONST_DECL.
        (build_class_member_access_expr): Look through unscoped enums.
        * search.c (context_for_name_lookup): Look through unscoped enums.
        * pt.c (tsubst_copy_and_build): Don't decay CONST_DECL.
        (tsubst_copy): Use DECL_CONTEXT to find the enumeration.
        * tree.c (decl_linkage): Likewise.
        * cvt.c (ocp_convert): Check decayed expr for enum range warning.
gcc/c-family/
        * c-common.c (get_priority): Call default_conversion.

Reply via email to