This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
libstdc++/1717: some include trouble + wrong output via wcout
- To: gcc-gnats at gcc dot gnu dot org
- Subject: libstdc++/1717: some include trouble + wrong output via wcout
- From: michael at ritzert dot de
- Date: 21 Jan 2001 10:29:03 -0000
- Reply-To: michael at ritzert dot de
>Number: 1717
>Category: libstdc++
>Synopsis: some include trouble + wrong output via wcout
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Sun Jan 21 02:36:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: michael@ritzert.de
>Release: gcc version 2.97 20010120 (experimental)
>Organization:
>Environment:
Linux rince 2.2.16
>Description:
Note that I see two issues here.
The first is that I can't find a proper way to get WEOF defined.
The second is the wrong output I get.
The full gcc -v output is:
ritzert@rince:~ > c++ -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/2.97/specs
Configured with: ../gcc/configure --enable-languages=c++ --enable-threads --prefix=/usr --enable-cstdio=libio --disable-new-gxx-abi
gcc version 2.97 20010120 (experimental)
Here is what I did: (x1.cpp to x3.cpp refer to the attached files)
ritzert@rince:~/test > c++ -Wall -pedantic -c x1.cpp
In file included from /usr/include/g++-v3/bits/std_iosfwd.h:38,
from /usr/include/g++-v3/bits/std_ios.h:37,
from /usr/include/g++-v3/bits/std_ostream.h:37,
from /usr/include/g++-v3/bits/std_iostream.h:38,
from /usr/include/g++-v3/iostream:2,
from x1.cpp:3:
/usr/include/g++-v3/bits/std_cwchar.h:57: conflicting types for `typedef struct
mbstate_t mbstate_t'
/usr/include/wchar.h:57: previous declaration as `typedef struct mbstate_t
mbstate_t'
ritzert@rince:~/test > c++ -Wall -pedantic -c x2.cpp
In file included from /usr/include/g++-v3/bits/std_ios.h:39,
from /usr/include/g++-v3/bits/std_ostream.h:37,
from /usr/include/g++-v3/bits/std_iostream.h:38,
from /usr/include/g++-v3/iostream:2,
from x2.cpp:3:
/usr/include/g++-v3/bits/char_traits.h: In static member function `static
wint_t std::char_traits<wchar_t>::eof()':
/usr/include/g++-v3/bits/char_traits.h:283: `WEOF' undeclared (first use this
function)
/usr/include/g++-v3/bits/char_traits.h:283: (Each undeclared identifier is
reported only once for each function it appears in.)
ritzert@rince:~/test > c++ -Wall -pedantic -c x3.cpp
ritzert@rince:~/test > c++ -o x3 x3.o
ritzert@rince:~/test > ./x3
123456789ritzert@rince:~/test > ./x3 | hex
0000 31 32 33 34 35 36 37 38 39 00 00 00 00 00 00 00 12345678 9.......
0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ .......
>How-To-Repeat:
see above bash session
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-tgz; name="x.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="x.tar.gz"
H4sIADS4ajoAA+3UT2vCMBzG8V7Nq/ihF5WhadM/G4q37TTYccfRtVEDNZU01bKx977WbVhk7GbF
8XwuaUMaQuGbyp0k261zVtzlPPR9h9fck7EhvMjhkSe8QIgwCOv1buCHDvHzHutLWdjYEDlG2Tdp
7B/rpCm6OFC3BkonWZlKmieFTTP1uqDplLSUKdm1Kig3qTS0zA1lWap2L5Ydv9gn69hM1ovWlMoL
a2S8WbCyUHpFOt7IYhsnkurdZ4wxpS3bxEoPqX6i2KySG2q2GY+blx2N2Dvr7ZO8tDSf02Pf9YQf
hNHtHf/tqd8skjrNZqxnpC2NJj5jH4xd+rdejcq7fP9e2Oq/mW/6j9B/F1r9H3Jux/xzI6Dv/6sS
l+9fcPfYv/AO/dcD+u/AIJVLpSU93z890JBXy2/liOEmAAAAAAAAAAAAAAAAAAC4Ip9X+7ZOACgA
AA==