This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: bits/string2.h
- To: Bill Wendling <wendling at ganymede dot isdn dot uiuc dot edu>
- Subject: Re: bits/string2.h
- From: Andreas Jaeger <aj at suse dot de>
- Date: 22 May 2000 21:50:00 +0200
- Cc: gcc at gcc dot gnu dot org
- References: <20000522142448.H1596@ganymede.isdn.uiuc.edu>
>>>>> Bill Wendling writes:
> Hi all,
> Question here: I'm running gcc-2.95.2. When I try to compile something
> using the string functions, gcc uses the macros in include/bits/string2.h
> to optimize them, however, I get tons of warning messages like this:
> /usr/include/bits/string2.h: In function `__strcpy_small':
> /usr/include/bits/string2.h:419: warning: pointer of type `void *' used
> in arithmetic
> Here's the compile line:
> gcc -g -O2 -Wall -W -Wshadow -Wpointer-arith -Wbad-function-cast
> -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes
> -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -O
> -I. -I../../hdf5-1.2.2-snap1/test -I../src -I../../hdf5-1.2.2-snap1/src
> -I/home/wendling/dev/NewHDF/include -DNDEBUG -UH5_DEBUG_API -c -fPIC
> -DPIC stab.c
> Is there something I'm doing wrong? Is there a commandline option I could
> give it to stop these warnings?
That's a bug in gcc which is already fixed in the current development
version of gcc 2.96. Either don't use -Wpointer-arith or disable the
the inline macros if you don't like the warnings.
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de