This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Arithmetik on void pointers in libgcc2 sources
- To: gcc-bugs at gcc dot gnu dot org, pthomas at suse dot de
- Subject: Re: Arithmetik on void pointers in libgcc2 sources
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Mon, 5 Jun 2000 11:13:16 -0400 (EDT)
> 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