public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/54112] New: including complex.h and complex fails in C++03
@ 2012-07-28  7:57 glisse at gcc dot gnu.org
  2012-07-28 10:11 ` [Bug libstdc++/54112] " paolo.carlini at oracle dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: glisse at gcc dot gnu.org @ 2012-07-28  7:57 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54112

             Bug #: 54112
           Summary: including complex.h and complex fails in C++03
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: glisse@gcc.gnu.org


#include <complex.h>
#ifdef FIX
#undef complex
#endif
#include <complex>

fails to compile with glibc. Since libstdc++ already installs a complex.h
wrapper that #include_next complex.h, I guess it could easily #undef complex
afterwards.

Note that you can include tr1/complex instead of complex if you prefer.

I guess I could also ask glibc to protect their #define with #ifndef
__cplusplus.

It is strange that in C++11 it is impossible to have access to the C99
functions cacos and others, since C++11 hijacks their header. g++ accepts
_Complex, I expect we should still have access to those functions.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-08-13 11:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-28  7:57 [Bug libstdc++/54112] New: including complex.h and complex fails in C++03 glisse at gcc dot gnu.org
2012-07-28 10:11 ` [Bug libstdc++/54112] " paolo.carlini at oracle dot com
2012-07-28 10:27 ` glisse at gcc dot gnu.org
2012-07-28 10:50 ` paolo.carlini at oracle dot com
2012-08-13 11:55 ` glisse at gcc dot gnu.org
2012-08-13 11:58 ` glisse at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).