This is the mail archive of the gcc-patches@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]

Re: [c++] Keep tm, div_t, ldiv_t, lconv mangling on Solaris (PR libstdc++-v3/1773)


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


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