Interpretation needed Re: function prototypes (LONG)
david.f.prosser
dfp at cbnewsl.ATT.COM
Tue Jul 11 00:06:02 AEST 1989
In article <12040016 at hpfcdc.HP.COM> kathy at hpfcdc.HP.COM (Kathy Harris) writes:
>
>I'm still not clear on this. Is it only the "top-level" qualifier that
>is to be ignored for comparisons, or all qualifiers. For example, are
>the following compatible or not:
>
> int f(const int * p);
> int f(int * p);
>
>where the 'const' qualifier applies to the 'int' not to the 'pointer'.
These are not compatible types. Thus, in your example,
main() {
extern f(int *);
const int *q;
f(q);
}
a diagnostic is required.
Dave Prosser ...not an official X3J11 answer...
More information about the Comp.std.c
mailing list