X3J11 Pleasanton meeting summary
Doug Gwyn
gwyn at smoke.BRL.MIL
Tue Oct 9 22:41:59 AEST 1990
In article <7944:Oct906:02:0690 at kramden.acf.nyu.edu> brnstnd at kramden.acf.nyu.edu (Dan Bernstein) writes:
> x is of type char [100][3], sizeof(x) is 400
Not permitted. sizeof x is required to be 300.
>Where is it required that the size of an array be the
>number of elements in it times the size of an element?
3.3.3.4 uses the property in an example, and I think one can read 3.1.2.5
as specifying that an array type decribes ONLY the contiguous objects of
which it consists. 3.3.3.4 Semantics second paragraph lends further
support to this, since struct/union padding is mentioned but no mention
is made of array padding (which isn't supposed to exist). I think you
can also extract the same conclusion from 3.3.2.1 Semantics.
If it bothers you, send in a request for interpretation.
More information about the Comp.std.c
mailing list