public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/99995] New: [11 Regression] FAIL: 17_intro/headers/c++1998/49745.cc with -std=gnu++20
@ 2021-04-09 13:25 redi at gcc dot gnu.org
2021-04-12 7:41 ` [Bug libstdc++/99995] " rguenth at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2021-04-09 13:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99995
Bug ID: 99995
Summary: [11 Regression] FAIL:
17_intro/headers/c++1998/49745.cc with -std=gnu++20
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
In C++20 mode <memory> includes <bits/atomic_wait.h> which includes <unistd.h>
for SYS_futex, and that means that POSIX truncate is declared, leading to:
In file included from
/home/jwakely/build/powerpc64le-unknown-linux-gnu/libstdc++-v3/include/bits/atomic_wait.h:44,
from
/home/jwakely/build/powerpc64le-unknown-linux-gnu/libstdc++-v3/include/bits/atomic_base.h:41,
from
/home/jwakely/build/powerpc64le-unknown-linux-gnu/libstdc++-v3/include/bits/shared_ptr_atomic.h:33,
from
/home/jwakely/build/powerpc64le-unknown-linux-gnu/libstdc++-v3/include/memory:78,
from
/home/jwakely/build/powerpc64le-unknown-linux-gnu/libstdc++-v3/include/powerpc64le-unknown-linux-gnu/bits/stdc++.h:82,
from <command-line>:
/usr/include/unistd.h:1015: note: previous declaration 'int truncate(const
char*, __off_t)'
compiler exited with status 1
FAIL: 17_intro/headers/c++1998/49745.cc (test for excess errors)
Excess errors:
/home/jwakely/src/gcc/libstdc++-v3/testsuite/17_intro/headers/c++1998/49745.cc:22:
error: 'int truncate' redeclared as different kind of entity
This is only seen when adding -std=gnu++20 (or similar) to the test flags
explicitly, and only when PCH is enabled so that -include bits/stdc++.h is
added to the test flags, because otherwise that test doesn't include <memory>.
But the underlying problem is that including <unistd.h> means Bug 49745 has
returned: we include <unistd.h> from C++ library headers.
This is only an issue for C++20 mode, and will fix itself when the code to use
futexes moves into libstdc++.so rather than being in headers.
In the meantime, we might want to XFAIL that test for c++20 mode.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/99995] [11 Regression] FAIL: 17_intro/headers/c++1998/49745.cc with -std=gnu++20
2021-04-09 13:25 [Bug libstdc++/99995] New: [11 Regression] FAIL: 17_intro/headers/c++1998/49745.cc with -std=gnu++20 redi at gcc dot gnu.org
@ 2021-04-12 7:41 ` rguenth at gcc dot gnu.org
2021-04-12 10:35 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-12 7:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99995
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/99995] [11 Regression] FAIL: 17_intro/headers/c++1998/49745.cc with -std=gnu++20
2021-04-09 13:25 [Bug libstdc++/99995] New: [11 Regression] FAIL: 17_intro/headers/c++1998/49745.cc with -std=gnu++20 redi at gcc dot gnu.org
2021-04-12 7:41 ` [Bug libstdc++/99995] " rguenth at gcc dot gnu.org
@ 2021-04-12 10:35 ` cvs-commit at gcc dot gnu.org
2021-04-12 10:37 ` [Bug libstdc++/99995] [11 Regression] should not include <unistd.h> in c++20 mode redi at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-12 10:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99995
--- Comment #1 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:29046e02b84a16b6315d952d7f76c502d0d021c2
commit r11-8127-g29046e02b84a16b6315d952d7f76c502d0d021c2
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Mon Apr 12 11:12:47 2021 +0100
libstdc++: Fix test that fails in C++20 mode [PR 99995]
The 17_intro/headers/c++1998/49745.cc test fails for C++20 mode with PCH
enabled, because PCH makes it include <bits/stdc++.h>, which includes
<atomic>, and that includes <unistd.h> in C++20 mode. The <unistd.h>
dependency should go away when C++20 atomic waiting is stable, but will
probably remain while the feature is experimental. Change the test to
always include <bits/stdc++.h>, and XFAIL for C++20 and later.
libstdc++-v3/ChangeLog:
PR libstdc++/99995
* testsuite/17_intro/headers/c++1998/49745.cc: Include all
standard headers and XFAIL for effective-target c++20.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/99995] [11 Regression] should not include <unistd.h> in c++20 mode
2021-04-09 13:25 [Bug libstdc++/99995] New: [11 Regression] FAIL: 17_intro/headers/c++1998/49745.cc with -std=gnu++20 redi at gcc dot gnu.org
2021-04-12 7:41 ` [Bug libstdc++/99995] " rguenth at gcc dot gnu.org
2021-04-12 10:35 ` cvs-commit at gcc dot gnu.org
@ 2021-04-12 10:37 ` redi at gcc dot gnu.org
2021-04-21 12:06 ` [Bug libstdc++/99995] [11/12 " redi at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2021-04-12 10:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99995
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2021-04-12
Status|UNCONFIRMED |SUSPENDED
Summary|[11 Regression] FAIL: |[11 Regression] should not
|17_intro/headers/c++1998/49 |include <unistd.h> in c++20
|745.cc with -std=gnu++20 |mode
Target Milestone|11.0 |12.0
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I've done the XFAIL. Removing the <unistd.h> dependency isn't going to happen
for GCC 11.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/99995] [11/12 Regression] should not include <unistd.h> in c++20 mode
2021-04-09 13:25 [Bug libstdc++/99995] New: [11 Regression] FAIL: 17_intro/headers/c++1998/49745.cc with -std=gnu++20 redi at gcc dot gnu.org
` (2 preceding siblings ...)
2021-04-12 10:37 ` [Bug libstdc++/99995] [11 Regression] should not include <unistd.h> in c++20 mode redi at gcc dot gnu.org
@ 2021-04-21 12:06 ` redi at gcc dot gnu.org
2022-05-06 8:30 ` [Bug libstdc++/99995] [11/12/13 " jakub at gcc dot gnu.org
2023-05-08 12:21 ` [Bug libstdc++/99995] [11/12/13/14 " rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2021-04-21 12:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99995
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Similarly, <semaphore> unconditionally includes POSIX <semaphore.h> even if
we're not going to use it.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/99995] [11/12/13 Regression] should not include <unistd.h> in c++20 mode
2021-04-09 13:25 [Bug libstdc++/99995] New: [11 Regression] FAIL: 17_intro/headers/c++1998/49745.cc with -std=gnu++20 redi at gcc dot gnu.org
` (3 preceding siblings ...)
2021-04-21 12:06 ` [Bug libstdc++/99995] [11/12 " redi at gcc dot gnu.org
@ 2022-05-06 8:30 ` jakub at gcc dot gnu.org
2023-05-08 12:21 ` [Bug libstdc++/99995] [11/12/13/14 " rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ 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=99995
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|12.0 |12.2
--- Comment #4 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] 7+ messages in thread
* [Bug libstdc++/99995] [11/12/13/14 Regression] should not include <unistd.h> in c++20 mode
2021-04-09 13:25 [Bug libstdc++/99995] New: [11 Regression] FAIL: 17_intro/headers/c++1998/49745.cc with -std=gnu++20 redi at gcc dot gnu.org
` (4 preceding siblings ...)
2022-05-06 8:30 ` [Bug libstdc++/99995] [11/12/13 " jakub at gcc dot gnu.org
@ 2023-05-08 12:21 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-05-08 12:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99995
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|12.3 |12.4
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 12.3 is being released, retargeting bugs to GCC 12.4.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-05-08 12:21 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09 13:25 [Bug libstdc++/99995] New: [11 Regression] FAIL: 17_intro/headers/c++1998/49745.cc with -std=gnu++20 redi at gcc dot gnu.org
2021-04-12 7:41 ` [Bug libstdc++/99995] " rguenth at gcc dot gnu.org
2021-04-12 10:35 ` cvs-commit at gcc dot gnu.org
2021-04-12 10:37 ` [Bug libstdc++/99995] [11 Regression] should not include <unistd.h> in c++20 mode redi at gcc dot gnu.org
2021-04-21 12:06 ` [Bug libstdc++/99995] [11/12 " redi at gcc dot gnu.org
2022-05-06 8:30 ` [Bug libstdc++/99995] [11/12/13 " jakub at gcc dot gnu.org
2023-05-08 12:21 ` [Bug libstdc++/99995] [11/12/13/14 " rguenth 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).