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++/59087] Issues including complex.h in C++11/1y mode because of C's complex.h


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

--- Comment #13 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Vitali from comment #12)
> It seems like the inclusion of C99 complex.h is a GNU
> extension & should only be done if GNU extensions are enabled.

That would be a possibility, but do you think your lapack header will
appreciate it if the complex.h it includes suddenly doesn't contain what it
expects at all? It will break even worse.

C++ code has 0 reason to include complex.h, only C code does, and thus it makes
sense if it contains what C says. We do #undef complex but only because we are
forced to do it.

As for boost, reusing the name of a standard C macro is not the best idea for
interoperability. If you report it to them, I hope they would be fine with
replacing all 'I' with 'It'.


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