struct compatibility
- From: Christian Kandeler <christian.kandeler@xxxxxx>
- Date: Tue, 31 Jan 2006 10:29:43 +0100
Hi,
I'd like to know whether the following code is standard-compliant:
struct generic {
int x;
int a[1];
};
void f(struct generic *s)
{
int i;
for (i = 0; i < 10; i++)
s->a[i] = i;
}
int main(void)
{
struct special {
int x;
int a[10];
} s;
f((struct generic *) &s);
return 0;
}
Thanks,
Christian
.
- Follow-Ups:
- Re: struct compatibility
- From: Michael Mair
- Re: struct compatibility
- From: Marc Boyer
- Re: struct compatibility
- Prev by Date: Re: What u mean by this statemnet ?.
- Next by Date: Re: Trap representation
- Previous by thread: hii
- Next by thread: Re: struct compatibility
- Index(es):
Relevant Pages
|