Re: [AD] Type-pun warnings with GCC 4.1

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sunday 02 July 2006 04:35, Peter Wang wrote:
> On 2006-07-02, Chris <chris.kcat@xxxxxxxxxx> wrote:
> > When building the latest SVN from SF using GCC 4.1.1, I get some type-pun
> > warnings when compiling dat.c and grabber.c (which would invariably cause
> > failure with --enable-strictwarn). The attached patch fixes dat.c,
>
> You can commit those if they work.

Done.

> If a better way is not found, it appears squeezing in an intermediate
> cast to (void *) disables the warnings, e.g.
>      *parent = (DATAFILE **) (void *) &(*dat)->dat; // error here!

If anyone has ideas, I'll wait on this for a couple days. Might be better to 
try and rework grabber a bit though, as those double and triple pointers look 
rather nasty.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/