"Ben Wing" <ben(a)666.com> wrote:
>
/coda/tleepslib.sk.tsukuba.ac.jp/Software/XEmacs/21.5/src/free-hook.c:
> > 134: warning: dereferencing type-punned pointer will break
> strict-aliasing rules
> >
> /coda/tleepslib.sk.tsukuba.ac.jp/Software/XEmacs/21.5/src/free
> -hook.c:260: warning: dereferencing type-punned pointer will
> break strict-aliasing rules
>
> That doesn't look easy to fix. I'll come up with something,
> but it is probably going to involve ugly unions.
Jerry -- it's actually quite easy to make these go away; just put in an
intermediate cast to (void *).
As I remarked on xemacs-patches, I think that such an intermediate cast
to (void *) only fools gcc into not emitting the warnings. I do not
believe it follows the C99 rules for aliases. Give me a couple of days
to contact someone who can speak authoritatively on the subject.
--
Jerry James
http://www.ittc.ku.edu/~james/