This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: alias: Varying struct and fixed scalar question
- From: Andreas Krebbel <krebbel1 at de dot ibm dot com>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 1 Feb 2006 13:21:40 +0100
- Subject: Re: alias: Varying struct and fixed scalar question
- References: <20060201120207.GA3521@de.ibm.com>
> struct foo { int n; };
> extern unsigned long c = 0;
>
> {
> int b;
>
> b = 2;
> ((struct foo*)(&b + c))->n = 3;
> }
For having a true dependency the example should look like this:
struct foo { int n; };
extern unsigned long c = 0;
{
int b;
int d;
b = 2;
d = ((struct foo*)(&b + c))->n;
}
Bye,
-Andreas-