ISO Aliasing rules question
Michael Matz
matz@suse.de
Fri Feb 21 20:10:00 GMT 2003
Hi,
On Fri, 21 Feb 2003, Mark Mitchell wrote:
> The C++ standard has this language:
>
> If a program attempts to access the stored value of an object through
> an lvalue of other than one of the following types the behavior is
> undefined25):
>
> --the dynamic type of the object,
>
> ...
>
> The problem here is that b doesn't have the dynamic type s2.
>
> I think the C standard has similar language -- somewhere.
6.5 #6 defines effective type (that's the dynamic type of C++)
6.5 #7 defines the permitted accesses (the aliasing rules. similar to
C++, except it doesn't contain the base class case)
Ciao,
Michael.
More information about the Gcc
mailing list