------- Comment #55 from marc dot glisse at normalesup dot org  2006-05-09 
13:55 -------
A few remarks on (really) defining __cplusplus to 199711L on solaris.

One issue I already mentionned in libstdc++/27340 is some conflicts on names
like std::__cos.

An other issue is the fact that solaris (>=9) headers have (when __cplusplus is
at least 199711L) already the correct c++ declarations for functions like
wcschr or wcspbrk, so we would need a macro to disable all the extra
definitions like:
  inline wchar_t*
  wcschr(wchar_t* __p, wchar_t __c)
  { return wcschr(const_cast<const wchar_t*>(__p), __c); }
that are provided in the c* headers. This means all the overloaded math
functions as well (except the non-standard integer versions, for which I always
wished g++ would at least emit a warning).

The headers (like stddef.h) provided by gcc and that take precedence over the
solaris headers need to be patched to look more like the headers they are
replacing.

An other problem is that it breaks the ABI (a c++ function that takes a struct
tm won't be mangled the same as one that takes a std::tm).

It will break bad code that declares struct tm in the global namespace instead
of including the standard headers (gtk+-1.2).

If this were done, it would become quite easy to chose, each time we call g++,
whether we want to use the gcc headers or headers that keep the global
namespace clean, which is good :-)


-- 

marc dot glisse at normalesup dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marc dot glisse at
                   |                            |normalesup dot org


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

Reply via email to