Qualified array or function types

Doug Gwyn gwyn at smoke.BRL.MIL
Sat Nov 18 06:22:21 AEST 1989


In article <11144 at riks.csl.sony.co.jp> diamond at ws.sony.junet (Norman Diamond) writes:
>Section 3.5.3, page 65 lines 23 to 25, cite array types or function
>types that include type qualifiers.  Footnote 65 says that these can
>only occur through the use of typedefs.  Footnote 65 seems to be false.
>I cannot find any Constraint or Semantic "shall" (or even "can") that
>prevents
>  const a[3];

That's not an example of what Footnote 65 is referring to;
that's an ordinary application of the type qualifier "const"
to the member type (int), not to the array type, and the
qualifier is valid there.  However, the attempted declaration
	int a const [3];
is disallowed by the grammar, and that is what Footnote 65
is discussing -- since the grammar disallows this, how COULD
one have the specification of an array (similarly, function)
type (as opposed to some subtype) include any type qualifiers?
Footnote 65 answers that question.



More information about the Comp.std.c mailing list