https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90451
Bug ID: 90451 Summary: "static" function which added "deprecated" print deprecated warning >1 times (twice or even 3 times) Product: gcc Version: 8.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: chen.4.zh...@nokia-sbell.com Target Milestone: --- Created attachment 46346 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46346&action=edit static_deprecated_function about deprecated feature #if __cplusplus>=201402L [[deprecated("")]] #endif if function is not a static function, the deprecated warning print 1 times as expected;(v1) if function is a static function, the same deprecated warning print >1 times; in my case, if the function is "static", and called by "::" , the same deprecated warning print 3 times(v2); if called by ".", the same deprecated warning printed 2 times.(v3) case code attached