public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/93151] system_error header fails to compile with -D_XOPEN_SOURCE=600
[not found] <bug-93151-4@http.gcc.gnu.org/bugzilla/>
@ 2020-12-14 16:39 ` redi at gcc dot gnu.org
2020-12-16 13:36 ` cvs-commit at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2020-12-14 16:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93151
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2227r0.html fixed C++
to depend on a later POSIX standard which defines EOWNERDEAD and
ENOTRECOVERABLE but that won't help existing system headers which don't check
__cplusplus anyway.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/93151] system_error header fails to compile with -D_XOPEN_SOURCE=600
[not found] <bug-93151-4@http.gcc.gnu.org/bugzilla/>
2020-12-14 16:39 ` [Bug libstdc++/93151] system_error header fails to compile with -D_XOPEN_SOURCE=600 redi at gcc dot gnu.org
@ 2020-12-16 13:36 ` cvs-commit at gcc dot gnu.org
2020-12-16 13:52 ` redi at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-16 13:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93151
--- Comment #6 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:a2c2eec183acf25c9b214fa0827718e4d2fdfc93
commit r11-6137-ga2c2eec183acf25c9b214fa0827718e4d2fdfc93
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue Dec 15 20:28:11 2020 +0000
libstdc++: Test errno macros directly, not via autoconf [PR 93151]
This fixes a bug caused by a mismatch between the macros defined by
<errno.h> when GCC is built and the macros defined by <errno.h> when
users include <system_error>. If the user code is compiled with
_XOPEN_SOURCE defined to 500 or 600, Darwin suppresses the
ENOTRECOVERABLE and EOWNERDEAD macros, which are not defined by SUSv3
(aka POSIX.1-2001).
Since POSIX requires the errno macros to be macros (and not variables or
enumerators) we can just test for them directly using the preprocessor.
That means that <system_error> will match what is actuallydefined when
it's included, not what was defined when GCC was built. With that change
there is no need for the GLIBCXX_CHECK_SYSTEM_ERROR configure checks and
they can be removed.
libstdc++-v3/ChangeLog:
PR libstdc++/93151
* acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR): Remove.
* configure.ac: Regenerate.
* config/os/generic/error_constants.h: Test POSIX errno macros
directly, instead of corresponding _GLIBCXX_HAVE_EXXX macros.
* testsuite/19_diagnostics/headers/system_error/errc_std_c++0x.cc:
Likewise.
* testsuite/19_diagnostics/headers/system_error/93151.cc: New
test.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/93151] system_error header fails to compile with -D_XOPEN_SOURCE=600
[not found] <bug-93151-4@http.gcc.gnu.org/bugzilla/>
2020-12-14 16:39 ` [Bug libstdc++/93151] system_error header fails to compile with -D_XOPEN_SOURCE=600 redi at gcc dot gnu.org
2020-12-16 13:36 ` cvs-commit at gcc dot gnu.org
@ 2020-12-16 13:52 ` redi at gcc dot gnu.org
2021-03-29 20:01 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2020-12-16 13:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93151
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed on trunk so far.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/93151] system_error header fails to compile with -D_XOPEN_SOURCE=600
[not found] <bug-93151-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2020-12-16 13:52 ` redi at gcc dot gnu.org
@ 2021-03-29 20:01 ` cvs-commit at gcc dot gnu.org
2021-03-29 20:04 ` redi at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-29 20:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93151
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:f1b7f082d09a5ebcf7632b1fd446551f480dc9a8
commit r10-9577-gf1b7f082d09a5ebcf7632b1fd446551f480dc9a8
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue Dec 15 20:28:11 2020 +0000
libstdc++: Test errno macros directly, not via autoconf [PR 93151]
This fixes a bug caused by a mismatch between the macros defined by
<errno.h> when GCC is built and the macros defined by <errno.h> when
users include <system_error>. If the user code is compiled with
_XOPEN_SOURCE defined to 500 or 600, Darwin suppresses the
ENOTRECOVERABLE and EOWNERDEAD macros, which are not defined by SUSv3
(aka POSIX.1-2001).
Since POSIX requires the errno macros to be macros (and not variables or
enumerators) we can just test for them directly using the preprocessor.
That means that <system_error> will match what is actually defined when
it's included, not what was defined when GCC was built. With that change
there is no need for the GLIBCXX_CHECK_SYSTEM_ERROR configure checks and
they can be removed.
libstdc++-v3/ChangeLog:
PR libstdc++/93151
* acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR): Remove.
* configure.ac: Regenerate.
* config/os/generic/error_constants.h: Test POSIX errno macros
directly, instead of corresponding _GLIBCXX_HAVE_EXXX macros.
* testsuite/19_diagnostics/headers/system_error/errc_std_c++0x.cc:
Likewise.
* testsuite/19_diagnostics/headers/system_error/93151.cc: New
test.
(cherry picked from commit a2c2eec183acf25c9b214fa0827718e4d2fdfc93)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/93151] system_error header fails to compile with -D_XOPEN_SOURCE=600
[not found] <bug-93151-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2021-03-29 20:01 ` cvs-commit at gcc dot gnu.org
@ 2021-03-29 20:04 ` redi at gcc dot gnu.org
2021-04-19 10:40 ` redi at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2021-03-29 20:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93151
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
And for 10.3
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/93151] system_error header fails to compile with -D_XOPEN_SOURCE=600
[not found] <bug-93151-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2021-03-29 20:04 ` redi at gcc dot gnu.org
@ 2021-04-19 10:40 ` redi at gcc dot gnu.org
2022-05-09 16:40 ` cvs-commit at gcc dot gnu.org
2022-05-09 16:40 ` cvs-commit at gcc dot gnu.org
7 siblings, 0 replies; 8+ 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=93151
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|redi at gcc dot gnu.org |unassigned at gcc dot gnu.org
Status|ASSIGNED |NEW
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/93151] system_error header fails to compile with -D_XOPEN_SOURCE=600
[not found] <bug-93151-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2021-04-19 10:40 ` redi at gcc dot gnu.org
@ 2022-05-09 16:40 ` cvs-commit at gcc dot gnu.org
2022-05-09 16:40 ` cvs-commit at gcc dot gnu.org
7 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-09 16:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93151
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:4b5211c85aed64c7f6034dad8f57e03c0302c5ec
commit r9-10061-g4b5211c85aed64c7f6034dad8f57e03c0302c5ec
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue Dec 15 20:28:11 2020 +0000
libstdc++: Test errno macros directly, not via autoconf [PR 93151]
This fixes a bug caused by a mismatch between the macros defined by
<errno.h> when GCC is built and the macros defined by <errno.h> when
users include <system_error>. If the user code is compiled with
_XOPEN_SOURCE defined to 500 or 600, Darwin suppresses the
ENOTRECOVERABLE and EOWNERDEAD macros, which are not defined by SUSv3
(aka POSIX.1-2001).
Since POSIX requires the errno macros to be macros (and not variables or
enumerators) we can just test for them directly using the preprocessor.
That means that <system_error> will match what is actually defined when
it's included, not what was defined when GCC was built. With that change
there is no need for the GLIBCXX_CHECK_SYSTEM_ERROR configure checks and
they can be removed.
libstdc++-v3/ChangeLog:
PR libstdc++/93151
* acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR): Remove.
* config.h.in: Regenerate.
* configure: Regenerate.
* configure.ac (GLIBCXX_CHECK_SYSTEM_ERROR): Do not use.
* config/os/generic/error_constants.h: Test POSIX errno macros
directly, instead of corresponding _GLIBCXX_HAVE_EXXX macros.
* testsuite/19_diagnostics/headers/system_error/errc_std_c++0x.cc:
Likewise.
* testsuite/19_diagnostics/headers/system_error/93151.cc: New
test.
(cherry picked from commit a2c2eec183acf25c9b214fa0827718e4d2fdfc93)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/93151] system_error header fails to compile with -D_XOPEN_SOURCE=600
[not found] <bug-93151-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2022-05-09 16:40 ` cvs-commit at gcc dot gnu.org
@ 2022-05-09 16:40 ` cvs-commit at gcc dot gnu.org
7 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-09 16:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93151
--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:740e1ae17770d8e4829714c689f5471d235184b7
commit r9-10062-g740e1ae17770d8e4829714c689f5471d235184b7
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Thu Dec 17 13:27:04 2020 +0000
libstdc++: Test errno macros directly for all targets [PR 93151]
This applies the same changes to the djgpp and mingw versions of
error_constants.h as r11-6137 did for the generic version.
All of these constants are defined as macros by <errno.h> on these
targets, so we can just test the macro directly instead of checking for
it at configure time.
libstdc++-v3/ChangeLog:
PR libstdc++/93151
* config/os/djgpp/error_constants.h: Test POSIX errno macros
directly, instead of corresponding _GLIBCXX_HAVE_EXXX macros.
* config/os/mingw32-w64/error_constants.h: Likewise.
* config/os/mingw32/error_constants.h: Likewise.
(cherry picked from commit 217d5beaff9987a9845155fc796322b5f8bb876d)
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-05-09 16:40 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-93151-4@http.gcc.gnu.org/bugzilla/>
2020-12-14 16:39 ` [Bug libstdc++/93151] system_error header fails to compile with -D_XOPEN_SOURCE=600 redi at gcc dot gnu.org
2020-12-16 13:36 ` cvs-commit at gcc dot gnu.org
2020-12-16 13:52 ` redi at gcc dot gnu.org
2021-03-29 20:01 ` cvs-commit at gcc dot gnu.org
2021-03-29 20:04 ` redi at gcc dot gnu.org
2021-04-19 10:40 ` redi at gcc dot gnu.org
2022-05-09 16:40 ` cvs-commit at gcc dot gnu.org
2022-05-09 16:40 ` 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).