Article View: comp.std.c
Article #4138Re: Composite type of incompatible parameter types
From: Jutta Degener
Date: Fri, 29 Sep 1995 17:28
Date: Fri, 29 Sep 1995 17:28
29 lines
1663 bytes
1663 bytes
Paul Long <plong@perf.com> writes:
> For example, what is the type of the composite type's
> parameter that is constructed from the following function declarations?
>
> void foo(volatile);
> void foo(const a) {
> a = 3;
> }
The type of the composite function's parameter is int; but the type
of "a" in the body of foo is "const int".
That is, the composite type of the function has no influence
on the actual types of the parameters in the function body; their
types remain as declared in the function definition (modulo the
decays for parameters declared as arrays and functions).
> Technical Corrigendum 1 says that "In the determination of type
> compatibility and of a composite type, ... each parameter declared with
> qualified type is taken as having the unqualified version of its declared
> type." So does that means that
> 1. the types of my two foo declarations are compatible,
> 2. the composite type of the parameter is int,
> 3. a is a modifiable lvalue, and
> 4. this is a conforming program?
Yes, yes, no, no.
Jutta Degener (jutta@cs.tu-berlin.de)
Technical Details
Message-ID:
<44habt$6vc@news.cs.tu-berlin.de>Path:
arc1-ca.pugleaf.net!cs.tu-berlin.de!juttaReferences:
<44fkc3$hj3@news0.rain.rg.net>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!cs.tu-berlin.de!jutta From: jutta@cs.tu-berlin.de (Jutta Degener) Newsgroups: comp.std.c Subject: Re: Composite type of incompatible parameter types Date: 29 Sep 1995 17:28:29 GMT Organization: Technical University of Berlin, Germany Message-ID: <44habt$6vc@news.cs.tu-berlin.de> References: <44fkc3$hj3@news0.rain.rg.net> NNTP-Posting-Host: kugelbus.cs.tu-berlin.de Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Summary: Crunchy on the outside, with a chewy center.