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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org
      Known to work|                            |4.9.4
            Summary|"static" function which     |[7/8/9/10 Regression]
                   |added "deprecated" print    |"static" function which
                   |deprecated warning >1 times |added "deprecated" print
                   |(twice or even 3 times)     |deprecated warning >1 times
                   |                            |(twice or even 3 times)
      Known to fail|                            |10.0, 5.5.0, 6.5.0, 7.4.0,
                   |                            |8.3.0, 9.1.0

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Using GNU attribute syntax this version compiles with GCC 4.9 and only gives
one warning, but gives two with GCC 5:

struct myclass{
    __attribute__((deprecated("deprecated the static")))
    static void static_deprecate() { }
};

int main()
{
    myclass::static_deprecate();
}

The duplicate diagnostic first appeared with r217677:

            PR c++/33911
    gcc/cp/
            * call.c (build_call_a): Don't warn_deprecated_use here.
            (build_over_call): Or here.
            * decl2.c (mark_used): Do it here.
            (is_late_template_attribute): Attribute deprecated is not deferred.
            (cplus_decl_attributes): Propagate TREE_DEPRECATED out to the
template.
            * parser.c (cp_parser_template_name): Warn about deprecated
template.
            (cp_parser_template_argument): Likewise.
    libstdc++-v3/
            * include/backward/binders.h: Suppress -Wdeprecated-declarations.
            * include/ext/array_allocator.h: Likewise.

Reply via email to