This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/65473] Including <ciso646> does not define __GLIBCXX__


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]