[c++] Keep tm, div_t, ldiv_t, lconv mangling on Solaris (PR libstdc++-v3/1773)
Rainer Orth
ro@CeBiTec.Uni-Bielefeld.DE
Thu Aug 11 15:26:00 GMT 2011
Hi Paolo,
> All in all it seems to me that we are pretty close to be able to fix this
> old issue now and we are even in Stage 1, thus we can afford to take a bit
> of risk and handle possible fallout, thus I would recommend we do for now
> the above preprocessor dance (we are talking only about 4 instances) but
> controlled by a macro in os_defines.h, as Rainer correctly did already
> elsewhere. Rainer, can you test such change?
I could, but am a bit reluctant to do so since such a fix feels quite
fragile, and `fixes' the Solaris headers in many places where they are
completely correct. I'll also have to touch <time.h>, <wchar.h>,
<stdlib.h>, and <locale.h>, that all have using std::tm etc. clauses.
There might be an alternative implementation that is less invasive to
the C++ frontend, though: add
&& TARGET_DECL_NAMESPACE_STD_P (decl)
in write_unscoped_name, defaulting to true, override it in sol2.h (which
gets included via tm.h) and have the remaining logic in a new sol2-cxx.c
file. This way, the impact on the C++ frontend is minimal and we don't
have to resort to fragile fixincludes hacks.
Does this sound like a acceptable/viable alternative?
Thanks.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
More information about the Gcc-patches
mailing list