New section 3.9.6

Karl Heuer karl at haddock.ima.isc.com
Fri Dec 9 07:41:01 AEST 1988


In article <1988Dec5.220907.6239 at utzoo.uucp> henry at utzoo.uucp (Henry Spencer) writes:
>In article <1988Dec4.161125.20786 at sq.uucp> msb at sq.com (Mark Brader) writes:
>>    If I am right, this change is, well, silly.  To reject on the one hand
>>    the arguments put forward by me and others about eliminating the
>>    second syntax (this rejection on the grounds of "long-ingrained
>>    equivalence"), and then on the other hand to make obsolescent *one
>>    aspect* of the equivalence, merely gives us the worst of both worlds.
>
>Actually, both ideas have the problem of breaking old code.

If the new interpretation were to apply only to prototypes, then no old code
would be broken.  As Mark and I have repeatedly pointed out, this would have
been the perfect opportunity to get rid of one more of K&R's silent rewrite
rules.  (Note that X3J11 did get rid of the rewrite whereby `f(x) float x; \
{...}' actually declared x as a double; `f(x) int x[]; {...}' is now, I
believe, the only such DWIM left in the language.)

IMHO, The Committee should have made the entire construct `f(int x[])'
obsolescent.  This would still allow the Darnell notation$ to be added to a
future Standard, if that turns out to be the Right Thing, but it would also
allow for more ambitious undertakings%.

Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint
________
$ The Darnell syntax reserves array notation for pointers to non-overlapping
  areas, which is apparently what the Committee had in mind when they added
  this clause.
% In particular, the Brader-Heuer syntax, which reserves array notation for
  (surprise!) arrays, as distinct from pointers.



More information about the Comp.std.c mailing list