Subject: Re: libxslt upgrade, please
To: None <pkgsrc-users@netbsd.org>
From: Joerg Sonnenberger <joerg@britannica.bec.de>
List: pkgsrc-users
Date: 01/22/2007 15:24:23
On Mon, Jan 22, 2007 at 02:39:08PM +0100, Christian Biere wrote:
> > As it is explicitly allowed. Read: this is legal from the point of C99.
> 
> Then GCC may not C99 compliant as the manpage claims "it might not work as
> expected". This is probably a pretty horrible example because only the author
> can know what is supposed to be "expected" here.

No, the warning is correct as well :-) The behaviour of accessing the
elements in a union beside char * elements is not portable and might not
create the expected results. On the other hand, the standard explicitly
allows this behaviour as it is required if you want to use the memory
saving part of unions. In this way, the compiler is explicitly not
allowed to complain as the aliasing is explictly what is desired.

Joerg