Peter Eisentraut wrote:
> Bruce Momjian writes:
>
> > > It occurs to me that we ought to add -Wpointer-arith to our standard
> > > gcc options, so that this sort of mistake will be caught sooner in
> > > future.
>
> I agree with that. Actually, I could never imagine how one would use
> sizeof(void*) in the first place. I guess one can.
>
> > I added this to my Makefile.custom.
>
> I've had -Wpointer-arith and -Wcast-align in my Makefile.custom for a
> year, but apparently just last week I didn't do any builds where I
> actually paid attention. :-/
Here is what I have now for my custom:
CUSTOM_COPT=-g -Wall -Wmissing-prototypes \ -Wmissing-declarations -Wpointer-arith -Wcast-align
In Makefile.global.in, we have:ifeq ($(GCC), yes) CFLAGS += -Wall -Wmissing-prototypes -Wmissing-declarationsendif
Should I add -Wpointer-arith -Wcast-align for 7.3?
> Btw., I've never seen any problems related to -Wcast-align? Is the TODO
> item obsolete or is it platform-related?
That is a Tom item. I think there is some casting that masks the
problem. Tom?
-- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610)
853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill,
Pennsylvania19026