This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/59087] Issues including complex.h in C++11/1y mode because of C's complex.h
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 03 Sep 2014 19:20:14 +0000
- Subject: [Bug libstdc++/59087] Issues including complex.h in C++11/1y mode because of C's complex.h
- Auto-submitted: auto-generated
- References: <bug-59087-4 at http dot gcc dot gnu dot org/bugzilla/>
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'.