Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
4.2.0
-
None
-
Sun C++
-
Binary Incompatibility
Description
The size of the mbstate_t type and its aliiases (such as std::istream::traits_type::state_type)) appears to depend on the order in which stdcxx headers are #included:
$ cat u.cpp && gmake u.o && mv u.o v.o && gmake CPPOPTS=-DMAIN u LDOPTS=v.o && ./u #ifdef MAIN # include <iomanip> # include <istream> void mbstate_size (size_t); int main () { mbstate_size (sizeof (std::istream::traits_type::state_type)); } #else # include <assert.h> # include <wchar.h> # include <stdio.h> void mbstate_size (size_t n) { const size_t size = sizeof (mbstate_t); printf ("%zu == %zu\n", n, size); fflush (stdout); assert (n == size); } #endif CC -c -D_RWSTDDEBUG -mt -I/amd/devco/sebor/stdcxx/include -I/build/sebor/stdcxx-suncc-5.9-j1-15D/include -I/amd/devco/sebor/stdcxx/tests/include -library=%none -g -m64 +w -errtags -erroff=hidef u.cpp CC -c -D_RWSTDDEBUG -mt -I/amd/devco/sebor/stdcxx/include -I/build/sebor/stdcxx-suncc-5.9-j1-15D/include -I/amd/devco/sebor/stdcxx/tests/include -DMAIN -library=%none -g -m64 +w -errtags -erroff=hidef u.cpp CC u.o -o u -L/build/sebor/stdcxx-suncc-5.9-j1-15D/rwtest -lrwtest15D -library=%none -mt -m64 -L/build/sebor/stdcxx-suncc-5.9-j1-15D/lib v.o -R/build/sebor/stdcxx-suncc-5.9-j1-15D/lib:/build/sebor/stdcxx-suncc-5.9-j1-15D/rwtest -lstd15D -lm 24 == 32 Assertion failed: n == size, file u.cpp, line 24 Abort (core dumped)
Attachments
Issue Links
- incorporates
-
STDCXX-826 [Sun C++] SIGABRT in istringstream example
- Closed