diamond@csl.sony.co.jp (Norman Diamond) (11/17/89)
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]; -- Norman Diamond, Sony Corp. (diamond%ws.sony.junet@uunet.uu.net seems to work) Should the preceding opinions be caught or | James Bond asked his killed, the sender will disavow all knowledge | ATT rep for a source of their activities or whereabouts. | licence to "kill".
gwyn@smoke.BRL.MIL (Doug Gwyn) (11/18/89)
In article <11144@riks.csl.sony.co.jp> diamond@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.