This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [c++] Keep tm, div_t, ldiv_t, lconv mangling on Solaris (PR libstdc++-v3/1773)
- From: Marc Glisse <marc dot glisse at inria dot fr>
- To: Jason Merrill <jason at redhat dot com>
- Cc: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>, gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Wed, 10 Aug 2011 18:43:59 +0200 (CEST)
- Subject: Re: [c++] Keep tm, div_t, ldiv_t, lconv mangling on Solaris (PR libstdc++-v3/1773)
- References: <ydd7h6mrkbb.fsf@manam.CeBiTec.Uni-Bielefeld.DE> <4E429C2F.2080405@redhat.com>
On Wed, 10 Aug 2011, Jason Merrill wrote:
This seems like a problem with the Solaris headers that should be handled by
fixincludes.
The goal of the set of patches, apart from defining __cplusplus=199711L,
was to start using the Solaris headers properly, without setting weird
macros to ignore half of them or fixincluding half of their content out.
Fixincluding this seems like a shame. Solaris headers declare std::tm,
which is great. It just happens to break binary compatibility, so until
the next great g++ ABI break, we need some kind of workaround. Telling the
compiler that std::tm should be mangled as if it was ::tm looked like a
simple enough solution.
We could of course surround the 4 struct definitions with:
#if __cplusplus >= 199711L
}
#endif
and:
#if __cplusplus >= 199711L
namespace std {
using ::thing;
#endif
Or the switch to __cplusplus=199711L will have to wait until the next ABI
break...
I understand that you may not be happy with the idea of touching the
mangler for a platform-specific temporary issue.
(I am speaking independently of the quality of the patch itself)
--
Marc Glisse