This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Warnings in std_cwctype.h
- To: libstdc++ at sourceware dot cygnus dot com
- Subject: Warnings in std_cwctype.h
- From: petter at katsumoto dot matfys dot lth dot se (Petter Urkedal)
- Date: Wed, 28 Jun 2000 00:42:05 +0200 (CEST)
On my distribution, `-W -Werror' breaks compilation due to
the use of macros from <wctype.h>, like
# define iswspace(wc) \
(__builtin_constant_p (wc) && (wc) >= L'\0' && (wc) <= L'\xff' \
? (int) (__ctype32_b[wc] & _ISwspace) : iswspace (wc))
as shown below. Unless someone have a better idea, I suggest
we remove `-W' (we still have `-Wall').
I am using a SuSE 6.3 on an Athlon machine, with GCC check out
from CVS today.
Cheers,
petter
[libstdc++-v3]$ make
[...]
/usr/local/src/gcc-b/gcc/g++ -B/usr/local/src/gcc-b/gcc/ -B/usr/local/i686-pc-linux/bin/ -DHAVE_CONFIG_H -I. -I../../../../gcc/libstdc++-v3/src -I.. -nostdinc++ -I../../../../gcc/libstdc++-v3 -I../../../../gcc/libstdc++-v3/libio -I../../../../gcc/libstdc++-v3/config/cpu/i486 -I../../../../gcc/libstdc++-v3/config/gnu-linux -I/usr/local/include -g -O2 -fvtable-thunks -D_GNU_SOURCE -fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -Winline -Werror -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -Wl,--gc-sections -g -c -fPIC -DPIC ../../../../gcc/libstdc++-v3/src/locale.cc -o .libs/locale.lo
cc1plus: warnings being treated as errors
In file included from ../../../../gcc/libstdc++-v3/src/locale.cc:41:
../../../../gcc/libstdc++-v3/bits/std_cwctype.h: In function `int std::_S_iswspace_helper (unsigned
int)':
../../../../gcc/libstdc++-v3/bits/std_cwctype.h:65: warning: comparison of unsigned expression >= 0 is
always true
[etc...]
2000-06-28 Petter Urkedal <petter@matfys.lth.se>
* src/Makefile.am (AM_CXXFLAGS): Remove `-W' flag due to warnings
caused by C macros in wctype.h.
Index: src/Makefile.am
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/src/Makefile.am,v
retrieving revision 1.17
diff -c -p -r1.17 Makefile.am
*** Makefile.am 2000/06/19 23:43:19 1.17
--- Makefile.am 2000/06/27 22:07:53
*************** AC_CXXFLAGS = \
*** 53,59 ****
# occasion call for it. (ie, --enable-debug)
AM_CXXFLAGS = \
-fno-implicit-templates $(OPTIMIZE_CXXFLAGS) \
! -Wall -Wno-format -W -Wwrite-strings -Winline \
$(AC_CXXFLAGS)
--- 53,59 ----
# occasion call for it. (ie, --enable-debug)
AM_CXXFLAGS = \
-fno-implicit-templates $(OPTIMIZE_CXXFLAGS) \
! -Wall -Wno-format -Wwrite-strings -Winline \
$(AC_CXXFLAGS)