🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #312

Re: Interpretation needed Re: function prototypes (LONG)

#312
From: david.f.prosser
Date: Mon, 10 Jul 1989 14:06
22 lines
1049 bytes
In article <12040016@hpfcdc.HP.COM> kathy@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...
Technical Details
Message-ID: <1053@cbnewsl.ATT.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!att!cbnewsl!dfp
References: <12570014@hpclscu.HP.COM> <12040016@hpfcdc.HP.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!att!cbnewsl!dfp
From: dfp@cbnewsl.ATT.COM (david.f.prosser)
Newsgroups: comp.std.c
Subject: Re: Interpretation needed Re: function prototypes (LONG)
Message-ID: <1053@cbnewsl.ATT.COM>
Date: 10 Jul 89 14:06:02 GMT
References: <12570014@hpclscu.HP.COM> <12040016@hpfcdc.HP.COM>
Reply-To: dfp@cbnewsl.ATT.COM (david.f.prosser)
Organization: AT&T Bell Laboratories
Lines: 22