This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

time_put+wchar_t issue on solaris with __cplusplus


Hello,

I know people are not interested in having things in the right namespace, but I am still doing it for myself. I am using basically the attached patch. It is made for solaris 10, but there is very little difference with what could be used on solaris 9 and 8. What it does is:
* define __cplusplus as 199711L
* rename __cos &co in vallaray to avoid conflicts
* remove declaration of c++ specific libc functions (already declared)


Additionnally, I add in the same directory as fixincludes a modified
version of the system stdlib_iso.h that does not have the extra
definitions of bsearch and qsort, which g++ can't handle.

In the end, I get 8 unexpected failures in the testsuite:

FAIL: 21_strings/c_strings/char/2.cc (test for excess errors)
WARNING: 21_strings/c_strings/char/2.cc compilation failed to produce executable
FAIL: 21_strings/c_strings/wchar_t/2.cc (test for excess errors)
WARNING: 21_strings/c_strings/wchar_t/2.cc compilation failed to produce executable

FAIL: 22_locale/num_put/put/char/14220.cc execution test
FAIL: 22_locale/num_put/put/wchar_t/14220.cc execution test

FAIL: 22_locale/time_put/put/wchar_t/1.cc execution test
FAIL: 22_locale/time_put/put/wchar_t/10.cc execution test
FAIL: 22_locale/time_put/put/wchar_t/5.cc execution test
FAIL: 22_locale/time_put/put/wchar_t/9.cc execution test

The first 2 should actually be called "unexpected pass". The next 2 are also there without my patch. So there only remains the last 4, all of which are related to time_put and wchar_t. I think they are the same failures I was already seeing on solaris 8 when I experimented last year. For 1.cc, I tried using LD_LIBRARY_PATH to make it use the "regular" libstdc++.so.6 (it does not directly call any of the interfaces that change ABI) and it passes, so the problem is in libstdc++ (as opposed to the testcase). I am having a hard time figuring out how changing the value of __cplusplus can cause this. The only warnings in the compilation of libstdc++ are:

/opt/marc/source/gcc/libstdc++-v3/include/precompiled/stdtr1c++.h:30:25: warning: /marc/build/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10/bits/stdc++.h.gch/O0g.gch: created and used with differing settings of '-momit-leaf-frame-pointer'
/opt/marc/source/gcc/libstdc++-v3/../gcc/unwind-pe.h:74: warning: 'unsigned int size_of_encoded_value(unsigned char)' defined but not used

and they are clearly not related.

Does anyone have an idea on how to debug this? I have both versions of
the library, so I guess it should be possible to run them in parallel and
see when they diverge, but I have no idea how to do that.


Note: if I can fix this, my plan then is to add tests for the platform so the patch only affects recent solaris (I have strictly no idea how to do that, and for solaris 8 it should even depend on the patch level...) and make a version of the c* headers that does not import everything in the global namespace.


--
Marc Glisse

Attachment: gcc-diff
Description: Text document


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