qualifications in prototypes (was Re: Problems with IBM RS6000 C compiler)

diamond@tkovoa diamond at tkou02.enet.dec.com
Wed Aug 8 12:41:27 AEST 1990


In article <17247 at haddock.ima.isc.com> karl at kelp.ima.isc.com (Karl Heuer) writes:

[Can you pass an unqualified `char *' to a function whose prototype declares
a parameter of type `char const *'?]

>Okay, then, let's try 3.3.16.1 Simple Assignment: "Constraints: One of the
>following shall hold: ... both operands are pointers to qualified or
>unqualified versions of compatible types, and the type pointed to by the left
>has all the qualifiers of the type pointed to by the right."

Looks like you got it.  Thank you, and you win.  IBM's prototypes should
be changed.  (But just like using the real lint, we had to wade through a
misleading message before finding the correct one!  :-)

Mr. Heuer, I'm curious why you considered this discussion inappropriate for
comp.std.c.  Please advise by e-mail (or posting if you think it appropriate.)
-- 
Norman Diamond, Nihon DEC     diamond at tkou02.enet.dec.com
This is me speaking.  If you want to hear the company speak, you need DECtalk.



More information about the Comp.lang.c mailing list