[Bug libstdc++/59087] Issues including complex.h in C++11/1y mode because of C's complex.h

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Oct 10 11:35:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59087

--- Comment #19 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Vitali from comment #12)
> Actually, http://en.cppreference.com/w/cpp/header seems to indicate that
> when compiling as C++, complex.h should be equal to including ccomplex in a
> global namespace.

Maybe it used to say that, but it's correct now: <complex.h> just includes
<ccomplex> and doesn't add the content to the global namespace.

>  It seems like the inclusion of C99 complex.h is a GNU
> extension & should only be done if GNU extensions are enabled.

Yes. For GCC 8 you only get C99 <complex.h> for -std=gnu++NN modes, not
-std=c++NN modes.

Is there still any reason to keep this bug open?


More information about the Gcc-bugs mailing list