Latest GCC has mbstate_t problem

Peter J. Stieber
Tue Sep 23 23:20:00 GMT 2003

I'm using cygwin v1.5.5 under Win2K.

uname -a
CYGWIN_NT-5.0 lisa 1.5.5(0.94/3/2) 2003-09-20 16:31 i686 unknown unknown

cygcheck -s -v -r is attached.

A long time ago (11/7/2002) I reported a problem with GCC 3.2 20020818 that
involved the mbstate_t structure. cgf quickly fixed it back then. It seems
to be back. The following is a simple test case.

#include <iostream>
#include <wchar.h>
using namespace std;
int main()
  cout << "Hello world." << endl;

Attempt a compile with

g++ -v -Wall Sample.cpp

will result in the following (sorry for the line wrapping)

Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/specs
Configured with:
/netrel/src/gcc-3.3.1-1/configure --enable-languages=c,c++,f77,
java --enable-libgcj --enable-threads=posix --with-system-zlib --enable-nls 
thout-included-gettext --enable-interpreter --enable-sjlj-exceptions --disab
ersion-specific-runtime-libs --enable-shared --build=i686-pc-linux --host=i6
c-cygwin --target=i686-pc-cygwin --prefix=/usr --exec-prefix=/usr --sysconfd
etc --libdir=/usr/lib --includedir=/nonexistent/include --libexecdir=/usr/sb
Thread model: posix
gcc version 3.3.1 (cygming special)

/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/cc1plus.exe -quiet -v -D__GNUC__=3 -D_
UC_MINOR__=3 -D__GNUC_PATCHLEVEL__=1 -D__CYGWIN32__ -D__CYGWIN__ -Dunix -D__
__ -D__unix -idirafter
/w32api -idirafter /usr/local/lib/../../include/w32api
Sample.cpp -D__GNUG__=3 -
quiet -dumpbase Sample.cpp -auxbase Sample -Wall -version -o /tmp/ccdIx2kf.s
GNU C++ version 3.3.1 (cygming special) (i686-pc-cygwin)
        compiled by GNU C version 3.3.1 (cygming special).
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=131006
ignoring nonexistent directory "/usr/i686-pc-cygwin/include"
ignoring duplicate directory "/usr/include/w32api"
#include "..." search starts here:
#include <...> search starts here:
End of search list.
In file included from Sample.cpp:2:
/usr/include/wchar.h:38: error: conflicting types for `typedef struct
   _mbstate_t mbstate_t'
/usr/include/c++/3.3.1/cwchar:65: error: previous declaration as `typedef
   struct mbstate_t mbstate_t'

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 36695 bytes
Desc: not available
URL: <>
-------------- next part --------------
Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list