This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

[libstdc++] Problems with wctype (patch included)


Compiling the following simple, IMHO standard conforming, source file
does not work: 

cat t.C
#include <cwctype>
using std::wctype;

g++ -v -c t.C 
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/specs
Configured with: ../gcc/configure --enable-shared --enable-threads=posix --enable-languages=c,c++,f77,objc --disable-nls --enable-clocale=gnu
Thread model: posix
gcc version 3.0.1 20010818 (prerelease)
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/cc1plus -v -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=1 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ t.C -D__GNUG__=3 -D__GXX_DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -quiet -dumpbase t.C -version -o /tmp/ccDdJOQa.s
GNU CPP version 3.0.1 20010818 (prerelease) (cpplib) (i386 Linux/ELF)
GNU C++ version 3.0.1 20010818 (prerelease) (i686-pc-linux-gnu)
	compiled by GNU C version 3.0.1 20010818 (prerelease).
ignoring nonexistent directory "/usr/local/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include/g++-v3
 /usr/local/include/g++-v3/i686-pc-linux-gnu
 /usr/local/include/g++-v3/backward
 /usr/local/include
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include
 /usr/include
End of search list.
t.C:2: `wctype' not declared

The problem is that in the file c_std/bits/std_cwctype.h a using
wctype directive is missing. The appended patch fixes the problem.

Hope this helps,

Peter Schmid 

2001-08-29  Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>

	* libstdc++-v3/include/c_std/bits/std_cwctype.h: expose std::wctype.

*** libstdc++-v3/include/c_std/bits/std_cwctype.h.orig	Wed Aug 29 18:19:35 2001
--- libstdc++-v3/include/c_std/bits/std_cwctype.h	Wed Aug 29 18:19:58 2001
***************
*** 56,61 ****
--- 56,62 ----
  #undef towupper
  #undef towctrans
  #undef wctrans
+ #undef wctype
  
  namespace std
  {
*************** namespace std
*** 82,87 ****
--- 83,94 ----
    using ::towupper;
    using ::towctrans;
    using ::wctrans;
+   using ::wctype;
  }
  
  #endif 


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