public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/99871] New: #includes inside push visibility scope
@ 2021-04-01 16:58 nathan at gcc dot gnu.org
2021-04-01 17:57 ` [Bug libstdc++/99871] " redi at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: nathan at gcc dot gnu.org @ 2021-04-01 16:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99871
Bug ID: 99871
Summary: #includes inside push visibility scope
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: nathan at gcc dot gnu.org
Target Milestone: ---
I ran into this working on module bugs (99823). While it is not affecting that
debugging, it has code smell.
We have the following:
#pragma GCC visibility push(default)
.. some decls
#include <other header>
... more decls
#pragma GCC visibility pop
The case I ran into is
# 33 "../x86_64-pc-linux-gnu/libstdc++-v3/include/bits/nested_exception.h" 3
#pragma GCC visibility push(default)
...
#include "type_traits"
...
#pragma GCC visibility pop
That visibility pragma will not affect the visibility of decls in type_traits,
when that is translated to an include. Fortunately, you asked for default
visibility.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/99871] #includes inside push visibility scope
2021-04-01 16:58 [Bug libstdc++/99871] New: #includes inside push visibility scope nathan at gcc dot gnu.org
@ 2021-04-01 17:57 ` redi at gcc dot gnu.org
2021-04-01 18:00 ` redi at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2021-04-01 17:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99871
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2021-04-01
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/99871] #includes inside push visibility scope
2021-04-01 16:58 [Bug libstdc++/99871] New: #includes inside push visibility scope nathan at gcc dot gnu.org
2021-04-01 17:57 ` [Bug libstdc++/99871] " redi at gcc dot gnu.org
@ 2021-04-01 18:00 ` redi at gcc dot gnu.org
2021-04-06 14:09 ` redi at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2021-04-01 18:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99871
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I wonder if there's a reason we don't just put the visibility on the namespace
the way we do elsewhere:
namespace std _GLIBCXX_VISIBILITY(default)
I will do that, or just move the pragma after the includes.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/99871] #includes inside push visibility scope
2021-04-01 16:58 [Bug libstdc++/99871] New: #includes inside push visibility scope nathan at gcc dot gnu.org
2021-04-01 17:57 ` [Bug libstdc++/99871] " redi at gcc dot gnu.org
2021-04-01 18:00 ` redi at gcc dot gnu.org
@ 2021-04-06 14:09 ` redi at gcc dot gnu.org
2021-04-19 10:40 ` redi at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2021-04-06 14:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99871
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
We use the #pragma before using #include in most of the libsupc++ headers, and
also <tr1/specfun.h>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/99871] #includes inside push visibility scope
2021-04-01 16:58 [Bug libstdc++/99871] New: #includes inside push visibility scope nathan at gcc dot gnu.org
` (2 preceding siblings ...)
2021-04-06 14:09 ` redi at gcc dot gnu.org
@ 2021-04-19 10:40 ` redi at gcc dot gnu.org
2022-05-06 8:30 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2021-04-19 10:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99871
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |NEW
Assignee|redi at gcc dot gnu.org |unassigned at gcc dot gnu.org
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/99871] #includes inside push visibility scope
2021-04-01 16:58 [Bug libstdc++/99871] New: #includes inside push visibility scope nathan at gcc dot gnu.org
` (3 preceding siblings ...)
2021-04-19 10:40 ` redi at gcc dot gnu.org
@ 2022-05-06 8:30 ` jakub at gcc dot gnu.org
2022-05-06 8:49 ` redi at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-05-06 8:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99871
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|12.0 |12.2
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 12.1 is being released, retargeting bugs to GCC 12.2.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/99871] #includes inside push visibility scope
2021-04-01 16:58 [Bug libstdc++/99871] New: #includes inside push visibility scope nathan at gcc dot gnu.org
` (4 preceding siblings ...)
2022-05-06 8:30 ` jakub at gcc dot gnu.org
@ 2022-05-06 8:49 ` redi at gcc dot gnu.org
2022-05-06 13:45 ` cvs-commit at gcc dot gnu.org
2022-05-06 14:20 ` redi at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2022-05-06 8:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99871
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|12.2 |13.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/99871] #includes inside push visibility scope
2021-04-01 16:58 [Bug libstdc++/99871] New: #includes inside push visibility scope nathan at gcc dot gnu.org
` (5 preceding siblings ...)
2022-05-06 8:49 ` redi at gcc dot gnu.org
@ 2022-05-06 13:45 ` cvs-commit at gcc dot gnu.org
2022-05-06 14:20 ` redi at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-06 13:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99871
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:
https://gcc.gnu.org/g:488d268728bf701ac76a1392eaed202c80be3843
commit r13-152-g488d268728bf701ac76a1392eaed202c80be3843
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue Apr 6 15:11:15 2021 +0100
libstdc++: Do not use #include inside push visibility scope [PR99871]
libstdc++-v3/ChangeLog:
PR libstdc++/99871
* include/bits/specfun.h: Use visibility attribute on namespace,
instead of pragma push/pop.
* libsupc++/compare: Likewise.
* libsupc++/exception: Likewise.
* libsupc++/exception.h: Likewise.
* libsupc++/exception_ptr.h: Likewise.
* libsupc++/initializer_list: Likewise.
* libsupc++/nested_exception.h: Likewise.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/99871] #includes inside push visibility scope
2021-04-01 16:58 [Bug libstdc++/99871] New: #includes inside push visibility scope nathan at gcc dot gnu.org
` (6 preceding siblings ...)
2022-05-06 13:45 ` cvs-commit at gcc dot gnu.org
@ 2022-05-06 14:20 ` redi at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2022-05-06 14:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99871
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed for gcc 13.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-05-06 14:20 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01 16:58 [Bug libstdc++/99871] New: #includes inside push visibility scope nathan at gcc dot gnu.org
2021-04-01 17:57 ` [Bug libstdc++/99871] " redi at gcc dot gnu.org
2021-04-01 18:00 ` redi at gcc dot gnu.org
2021-04-06 14:09 ` redi at gcc dot gnu.org
2021-04-19 10:40 ` redi at gcc dot gnu.org
2022-05-06 8:30 ` jakub at gcc dot gnu.org
2022-05-06 8:49 ` redi at gcc dot gnu.org
2022-05-06 13:45 ` cvs-commit at gcc dot gnu.org
2022-05-06 14:20 ` redi 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).