https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109694
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:87de39e4c3686535728f3a347f772e73af4cf262 commit r14-389-g87de39e4c3686535728f3a347f772e73af4cf262 Author: Jakub Jelinek <ja...@redhat.com> Date: Tue May 2 10:58:19 2023 +0200 ibstdc++: Shut up -Wattribute-alias warning [PR109694] I've followed what other files do, using attribute alias with not really matching function type (after all, it isn't really possible when it is a constructor), but seems I've missed it warns: ../../../../../libstdc++-v3/src/c++98/ios_init.cc:203:8: warning: âvoid std::ios_base_library_init()â alias between functions of incompatible types âvoid()â and âvoid +(std::ios_base::Init::)()â [-Wattribute-alias=] 203 | void ios_base_library_init (void) | ^~~~~~~~~~~~~~~~~~~~~ ../../../../../libstdc++-v3/src/c++98/ios_init.cc:78:3: note: aliased declaration here 78 | ios_base::Init::Init() | ^~~~~~~~ The PR talks about clang++ warning there (which I think isn't really supported, libstdc++ sources ought to be built by GCC), but it warns when built with GCC too. The following patch fixes it by doing what other libstdc++ sources do in those cases. 2023-05-02 Jakub Jelinek <ja...@redhat.com> PR libstdc++/109694 * src/c++98/ios_init.cc: Add #pragma GCC diagnostic ignored for -Wattribute-alias.