public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/65473] New: Including <ciso646> does not define __GLIBCXX__
@ 2015-03-19 16:03 ldionne.2 at gmail dot com
2015-03-23 10:27 ` [Bug libstdc++/65473] " redi at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: ldionne.2 at gmail dot com @ 2015-03-19 16:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65473
Bug ID: 65473
Summary: Including <ciso646> does not define __GLIBCXX__
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: ldionne.2 at gmail dot com
Hi,
One would expect that including _any_ header from the standard library defines
the relevant detection macros. For example, I usually include the <ciso646>
header to check for libc++ (per http://goo.gl/eXNYJH). However, libstdc++'s
headers do not always define those detection macros.
Regards,
Louis Dionne
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/65473] Including <ciso646> does not define __GLIBCXX__
2015-03-19 16:03 [Bug libstdc++/65473] New: Including <ciso646> does not define __GLIBCXX__ ldionne.2 at gmail dot com
@ 2015-03-23 10:27 ` redi at gcc dot gnu.org
2015-03-23 13:02 ` ldionne.2 at gmail dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2015-03-23 10:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65473
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Louis Dionne from comment #0)
> One would expect that including _any_ header from the standard library
> defines the relevant detection macros.
That's not true for most of the <cxxx> headers.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/65473] Including <ciso646> does not define __GLIBCXX__
2015-03-19 16:03 [Bug libstdc++/65473] New: Including <ciso646> does not define __GLIBCXX__ ldionne.2 at gmail dot com
2015-03-23 10:27 ` [Bug libstdc++/65473] " redi at gcc dot gnu.org
@ 2015-03-23 13:02 ` ldionne.2 at gmail dot com
2015-04-09 16:19 ` ldionne.2 at gmail dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ldionne.2 at gmail dot com @ 2015-03-23 13:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65473
--- Comment #2 from Louis Dionne <ldionne.2 at gmail dot com> ---
Does the standard specify which headers should define those macros? If not,
then it's a QOI issue that could easily be solved. In all cases, does stdcxx
document which headers must be included in order to get those definitions? I
couldn't find it.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/65473] Including <ciso646> does not define __GLIBCXX__
2015-03-19 16:03 [Bug libstdc++/65473] New: Including <ciso646> does not define __GLIBCXX__ ldionne.2 at gmail dot com
2015-03-23 10:27 ` [Bug libstdc++/65473] " redi at gcc dot gnu.org
2015-03-23 13:02 ` ldionne.2 at gmail dot com
@ 2015-04-09 16:19 ` ldionne.2 at gmail dot com
2015-04-09 16:57 ` redi at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ldionne.2 at gmail dot com @ 2015-04-09 16:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65473
--- Comment #4 from Louis Dionne <ldionne.2 at gmail dot com> ---
(In reply to Jonathan Wakely from comment #3)
> (In reply to Louis Dionne from comment #2)
> > Does the standard specify which headers should define those macros?
>
> Of course not, __GLIBCXX__ is not specified by the standard at all.
The standard _could_ have said something like:
Detection macros must be defined when including the "<xxxxx>" header
at the very least.
>From your comment, I understand it doesn't.
> [...]
>
> But the unhelpful answer is "include anything that includes
> <bits/c++config.h>"
Thanks, I now include <cstddef>. I still think it would be a nice improvement
to include "<whatever your configuration header is>" in <ciso646> and to
document that, especially since it is super easy to do. Also, <ciso646> seems
well suited for that job since it is said to be empty by the standard, and so
this gives us a way to include the least amount of stuff while still getting
the detection macros.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/65473] Including <ciso646> does not define __GLIBCXX__
2015-03-19 16:03 [Bug libstdc++/65473] New: Including <ciso646> does not define __GLIBCXX__ ldionne.2 at gmail dot com
` (2 preceding siblings ...)
2015-04-09 16:19 ` ldionne.2 at gmail dot com
@ 2015-04-09 16:57 ` redi at gcc dot gnu.org
2015-09-04 9:17 ` redi at gcc dot gnu.org
2015-09-04 9:17 ` redi at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2015-04-09 16:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65473
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
But there's no such thing as a detection macro in the standard, so it's not
going to talk about where they belong.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/65473] Including <ciso646> does not define __GLIBCXX__
2015-03-19 16:03 [Bug libstdc++/65473] New: Including <ciso646> does not define __GLIBCXX__ ldionne.2 at gmail dot com
` (4 preceding siblings ...)
2015-09-04 9:17 ` redi at gcc dot gnu.org
@ 2015-09-04 9:17 ` redi at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2015-09-04 9:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65473
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Fri Sep 4 09:16:29 2015
New Revision: 227484
URL: https://gcc.gnu.org/viewcvs?rev=227484&root=gcc&view=rev
Log:
Make all <cxxx> headers include <bits/c++config.h>
PR libstdc++/65473
* include/c/cassert: Include <bits/c++config.h>.
* include/c/cerrno: Likewise.
* include/c/cfloat: Likewise.
* include/c/ciso646: Likewise.
* include/c/climits: Likewise.
* include/c_global/cassert: Likewise.
* include/c_global/cerrno: Likewise.
* include/c_global/cfloat: Likewise.
* include/c_global/ciso646: Likewise.
* include/c_global/climits: Likewise.
* include/c_std/cassert: Likewise.
* include/c_std/cerrno: Likewise.
* include/c_std/cfloat: Likewise.
* include/c_std/ciso646: Likewise.
* include/c_std/climits: Likewise.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/c/cassert
trunk/libstdc++-v3/include/c/cerrno
trunk/libstdc++-v3/include/c/cfloat
trunk/libstdc++-v3/include/c/ciso646
trunk/libstdc++-v3/include/c/climits
trunk/libstdc++-v3/include/c_global/cassert
trunk/libstdc++-v3/include/c_global/cerrno
trunk/libstdc++-v3/include/c_global/cfloat
trunk/libstdc++-v3/include/c_global/ciso646
trunk/libstdc++-v3/include/c_global/climits
trunk/libstdc++-v3/include/c_std/cassert
trunk/libstdc++-v3/include/c_std/cerrno
trunk/libstdc++-v3/include/c_std/cfloat
trunk/libstdc++-v3/include/c_std/ciso646
trunk/libstdc++-v3/include/c_std/climits
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/65473] Including <ciso646> does not define __GLIBCXX__
2015-03-19 16:03 [Bug libstdc++/65473] New: Including <ciso646> does not define __GLIBCXX__ ldionne.2 at gmail dot com
` (3 preceding siblings ...)
2015-04-09 16:57 ` redi at gcc dot gnu.org
@ 2015-09-04 9:17 ` redi at gcc dot gnu.org
2015-09-04 9:17 ` redi at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2015-09-04 9:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65473
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |6.0
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
All libstdc++ headers should include c++config.h now.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-09-04 9:17 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-19 16:03 [Bug libstdc++/65473] New: Including <ciso646> does not define __GLIBCXX__ ldionne.2 at gmail dot com
2015-03-23 10:27 ` [Bug libstdc++/65473] " redi at gcc dot gnu.org
2015-03-23 13:02 ` ldionne.2 at gmail dot com
2015-04-09 16:19 ` ldionne.2 at gmail dot com
2015-04-09 16:57 ` redi at gcc dot gnu.org
2015-09-04 9:17 ` redi at gcc dot gnu.org
2015-09-04 9:17 ` 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).