const arrays in prototypes
Doug Gwyn
gwyn at smoke.BRL.MIL
Wed May 30 21:20:08 AEST 1990
In article <1752 at tkou02.enet.dec.com> diamond at tkou02.enet.dec.com (diamond at tkovoa) writes:
>In section 3.7.1, "On entry to the function", argument values and
>parameter types are adjusted. So the type is adjusted at run time!!!!
Of course this is dealt with at compile time, just as are other
implicit type conversions in other contexts.
>In section 3.5.4.3, parameter types are not adjusted at all in
>prototypes for function declarators!!!!
They most certainly are; from 3.5.4.3 Semantics:
(For each parameter declared with a function or array type,
its type for these comparisons is the one that results from
conversion to a pointer type, as in 3.7.1. For each
parameter declared with qualified type, its type for these
comparisons is the unqualified version of its declared type.)
>Therefore three interpretations are now necessary.
No interpretations are needed; the intent of the standard is clear.
More information about the Comp.std.c
mailing list