public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/109694] New: trivial: libstdc++-v3/src/c++98/ios_init.cc:203: alias between functions of incompatible types
@ 2023-05-02 8:04 dcb314 at hotmail dot com
2023-05-02 8:46 ` [Bug libstdc++/109694] " jakub at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: dcb314 at hotmail dot com @ 2023-05-02 8:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109694
Bug ID: 109694
Summary: trivial: libstdc++-v3/src/c++98/ios_init.cc:203: alias
between functions of incompatible types
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
I just tried a build of gcc trunk with clang. It said:
trunk.year/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=]
Source code is
void ios_base_library_init (void)
__attribute__((alias ("_ZNSt8ios_base4InitC1Ev")));
Maybe a cast would shut up clang ?
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/109694] trivial: libstdc++-v3/src/c++98/ios_init.cc:203: alias between functions of incompatible types
2023-05-02 8:04 [Bug libstdc++/109694] New: trivial: libstdc++-v3/src/c++98/ios_init.cc:203: alias between functions of incompatible types dcb314 at hotmail dot com
@ 2023-05-02 8:46 ` jakub at gcc dot gnu.org
2023-05-02 8:59 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-05-02 8:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109694
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|13.0 |14.0
Last reconfirmed| |2023-05-02
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Target Milestone|--- |14.0
Status|UNCONFIRMED |ASSIGNED
CC| |jakub at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I doubt we support building libstdc++ with clang. Anyway, this warns also when
built with GCC.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/109694] trivial: libstdc++-v3/src/c++98/ios_init.cc:203: alias between functions of incompatible types
2023-05-02 8:04 [Bug libstdc++/109694] New: trivial: libstdc++-v3/src/c++98/ios_init.cc:203: alias between functions of incompatible types dcb314 at hotmail dot com
2023-05-02 8:46 ` [Bug libstdc++/109694] " jakub at gcc dot gnu.org
@ 2023-05-02 8:59 ` cvs-commit at gcc dot gnu.org
2023-05-02 9:09 ` jakub at gcc dot gnu.org
2023-05-04 7:44 ` cvs-commit at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-02 8:59 UTC (permalink / raw)
To: gcc-bugs
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 <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:87de39e4c3686535728f3a347f772e73af4cf262
commit r14-389-g87de39e4c3686535728f3a347f772e73af4cf262
Author: Jakub Jelinek <jakub@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 <jakub@redhat.com>
PR libstdc++/109694
* src/c++98/ios_init.cc: Add #pragma GCC diagnostic ignored for
-Wattribute-alias.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/109694] trivial: libstdc++-v3/src/c++98/ios_init.cc:203: alias between functions of incompatible types
2023-05-02 8:04 [Bug libstdc++/109694] New: trivial: libstdc++-v3/src/c++98/ios_init.cc:203: alias between functions of incompatible types dcb314 at hotmail dot com
2023-05-02 8:46 ` [Bug libstdc++/109694] " jakub at gcc dot gnu.org
2023-05-02 8:59 ` cvs-commit at gcc dot gnu.org
@ 2023-05-02 9:09 ` jakub at gcc dot gnu.org
2023-05-04 7:44 ` cvs-commit at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-05-02 9:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109694
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/109694] trivial: libstdc++-v3/src/c++98/ios_init.cc:203: alias between functions of incompatible types
2023-05-02 8:04 [Bug libstdc++/109694] New: trivial: libstdc++-v3/src/c++98/ios_init.cc:203: alias between functions of incompatible types dcb314 at hotmail dot com
` (2 preceding siblings ...)
2023-05-02 9:09 ` jakub at gcc dot gnu.org
@ 2023-05-04 7:44 ` cvs-commit at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-04 7:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109694
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:addbe91570d7da35c48e6cf35b002a94a699fdd0
commit r13-7288-gaddbe91570d7da35c48e6cf35b002a94a699fdd0
Author: Jakub Jelinek <jakub@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 <jakub@redhat.com>
PR libstdc++/109694
* src/c++98/ios_init.cc: Add #pragma GCC diagnostic ignored for
-Wattribute-alias.
(cherry picked from commit 87de39e4c3686535728f3a347f772e73af4cf262)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-05-04 7:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-02 8:04 [Bug libstdc++/109694] New: trivial: libstdc++-v3/src/c++98/ios_init.cc:203: alias between functions of incompatible types dcb314 at hotmail dot com
2023-05-02 8:46 ` [Bug libstdc++/109694] " jakub at gcc dot gnu.org
2023-05-02 8:59 ` cvs-commit at gcc dot gnu.org
2023-05-02 9:09 ` jakub at gcc dot gnu.org
2023-05-04 7:44 ` cvs-commit at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).