This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/65473] Including <ciso646> does not define __GLIBCXX__
- From: "ldionne.2 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 09 Apr 2015 16:18:54 +0000
- Subject: [Bug libstdc++/65473] Including <ciso646> does not define __GLIBCXX__
- Auto-submitted: auto-generated
- References: <bug-65473-4 at http dot gcc dot gnu dot org/bugzilla/>
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.