Zero Length Arrays Allowed in C Standard?
T. William Wells
bill at twwells.com
Fri Dec 15 05:26:46 AEST 1989
In article <1498 at utkcs2.cs.utk.edu> battle at alphard.cs.utk.edu (David Battle) writes:
: Is the order of elements of a structure guaranteed to be the same in memory
: as in the program? That is, given:
:
: struct foo {
: int a;
: int b;
: };
:
: struct foo bar;
:
: Is &bar.a guaranteed to be < &bar.b?
I don't think that K&R guarantees it but it might.
The dpANS does, however, guarantee it. See 3.5.2.1.
---
Bill { uunet | novavax | ankh | sunvice } !twwells!bill
bill at twwells.com
More information about the Comp.lang.c
mailing list