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]

Re: Arithmetik on void pointers in libgcc2 sources


* Kaveh R. Ghazi (ghazi@caip.rutgers.edu) [20000605 17:13]:

> You could also cast the relevant pointers to char* in the arithmetic
> expressions.

Yes, I know I could do that as well, but for code that will only be compiled
by gcc, why not use __extension__?

> PS: why do you want to add -Wpointer-arith?  Doesn't -pedantic
> already show -Wpointer-arith problems along with extra stuff?

Nope, it doesn't. Just try for yourself and you'll see the difference.

Philipp

-- 
Philipp Thomas <pthomas@suse.de>
Development, SuSE GmbH, Schanzaecker Str. 10, D-90443 Nuremberg, Germany

#define NINODE  50              /* number of in core inodes */
#define NPROC   30              /* max number of processes */
 	-- Version 7 UNIX fuer PDP 11, /usr/include/sys/param.h

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