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


 > From: Philipp Thomas <pthomas@suse.de>
 > 
 > When you add -Wpointer-arith to the warning flags, you'll get warnings for
 > libgcc2.c and frame-dwarf2.c in those places where arithmetik is done with
 > void pointers. While this is ok, as these are always compiled by gcc, I
 > would like to wrap those places in __extension__ () blocks to shut up gcc.
 > 
 > If this is acceptable, I'll post the corresponding patches.
 > Philipp

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

		--Kaveh

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

--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions

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