🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #4142

Re: Composite type of incompatible parameter types

#4142
From: Paul Long
Date: Fri, 29 Sep 1995 18:47
35 lines
2295 bytes
tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya) wrote:
[snip]
>By the way, does this mean that that after
>
>int f(const int);
>int g(const int);
>int g(const int);
>
>f has type int(const int) because types do not need to be composed: there is
>only one declaration, but g has type int(int)? Maybe, but it does not have
>any observable effects yet. However such curiosities bother me because
>some simple change in the standard can someday make this clearly
>unintended difference observable; and that I cannot think of what that
>dangerous change is, should be no reason to not fix this. This probably ought
>to be corrected by stating that the parameter qualifiers are never a part of
>the function type.

I agree, this could use some clarification.

>The TC1 statement clearly shows (in its use of `In the determination of
>type compatibility and of composite type' as a qualifier) that the type of a
>parameter and the `type of the parameter in the prototype part of the
>function type' need not be the same.

Okay, I see the subtle distinction. The parameters in a function type's
parameter type list can be differently qualified (and therefore of a different
type because qualified types are distinct) than the types of the corresponding
parameters themselves. This can only occur if the function type is constructed
as a composite type of two function types with parameter type lists. Spooky.

-- 
Paul Long                               45:29:14N 122:48:09W
plong@perf.com                          http://www.teleport.com/~pciwww/
    "Where time or intelligence are lacking, a goto may do the job."
        - M.E. Hopkins, "A Case for the GOTO," 1972.
Technical Details
Message-ID: <44hf0v$rkj@news0.rain.rg.net>
Path: arc1-ca.pugleaf.net!usenet.eel.ufl.edu!pacifier!rainrgnews0!usenet
References: <44fkc3$hj3@news0.rain.rg.net> <44h3ak$p3j@newshost.lanl.gov>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!usenet.eel.ufl.edu!pacifier!rainrgnews0!usenet
From: Paul Long <plong@perf.com>
Newsgroups: comp.std.c
Subject: Re: Composite type of incompatible parameter types
Date: 29 Sep 1995 18:47:59 GMT
Organization: Performance Computing Incorporated
Message-ID: <44hf0v$rkj@news0.rain.rg.net>
References: <44fkc3$hj3@news0.rain.rg.net> <44h3ak$p3j@newshost.lanl.gov>
NNTP-Posting-Host: yosemite.perf.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 1.1N (X11; I; SunOS 4.1.1 sun4c)
X-URL: news:44h3ak$p3j@newshost.lanl.gov