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]

Build failure on sysv5uw7.1.0: wchar_t typedefs in headers.


libstdc++-v3 fails to build on i586-sco-sysv5uw7.1.0 because of
`declaration does not declare anything' errors caused by wchar_t typedefs
in system headers (gcc-20010115 snapshot).

Adding multilib support to Makefile in ../../../gcc-20010115/libstdc++-v3
multidirs=
with_multisubdir=
running mkc++config
running mknumeric_limits
/devel/src/gcc-20010115.chk/gcc/g++ -B/devel/src/gcc-20010115.chk/gcc/ -nostdinc++  -L/devel/src/gcc-20010115.chk/i586-sco-sysv5uw7.1.0/libstdc++-v3/src -L/devel/src/gcc-20010115.chk/i586-sco-sysv5uw7.1.0/libstdc++-v3/src/.libs -B/usr/local/i586-sco-sysv5uw7.1.0/bin/ -B/usr/local/i586-sco-sysv5uw7.1.0/lib/ -isystem /usr/local/i586-sco-sysv5uw7.1.0/include  -I/devel/src/gcc-20010115.chk/i586-sco-sysv5uw7.1.0/libstdc++-v3/include     -o /devel/src/gcc-20010115.chk/i586-sco-sysv5uw7.1.0/libstdc++-v3/src/gen-num-limits ../../../gcc-20010115/libstdc++-v3/src/gen-num-limits.cc      -nodefaultlibs -lgcc -lc
In file included from /devel/src/gcc-20010115.chk/gcc/include/stdio.h:19,
                 from ../../../gcc-20010115/libstdc++-v3/src/gen-num-limits.cc:52:
/usr/include/sys/types.h:148: declaration does not declare anything
gen-num-limits failed to build, exiting.
mknumeric_limits failed to execute properly: exiting
make[1]: *** [configure-target-libstdc++-v3] Error 1
make[1]: Leaving directory `/devel/src/gcc-20010115.chk'

/usr/include/sys/types.h
145	
146	#ifndef	_WCHAR_T
147	#define	_WCHAR_T
148	typedef long  wchar_t;			/* wide character type */
149	#endif
150	

gcc/cp/decl.c
6900
6901    if (t == NULL_TREE && ! saw_friend)
6902      pedwarn ("declaration does not declare anything");
6903

Is `wchar_t' now a builtin type in C++ so that typedefs like the above now
need action from fixincludes? Solaris 2.5.1 has the same idiom in
/usr/include/libintl.h but bracketed within an `extern "C" {'.
Testing, a typedef for wchar_t within an extern "C" gives the same error
so that #ifndef __cplusplus bracketting would be needed.


wchar_t `declaration does not declare anything' from gcc/testsuite/g++.log .
75 gcc/include/stdlib.h:45
	typedef __WCHAR_TYPE__ wchar_t;
18 /usr/include/sys/types.h:148
typedef long  wchar_t;			/* wide character type */

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