🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #4140

Re: Composite type of incompatible parameter types

#4140
From: Larry Jones
Date: Fri, 29 Sep 1995 17:22
36 lines
1709 bytes
In article <44fkc3$hj3@news0.rain.rg.net>, Paul Long <plong@perf.com> writes:
> What is the type of a parameter in a composite type that is constructed
> from two function types whose corresponding parameters have incompatible
> types? (Whew!) 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;
>     }
> 
> 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,

Yes, as per TC1.

>     2. the composite type of the parameter is int,

Yes, as per TC1.

>     3. a is a modifiable lvalue, and

No.  TC1 only affects determining type compatibility and composite type,
neither of which apply to a.  a has it's defined type: const int.

>     4. this is a conforming program?

Probably. :-)
----
Larry Jones, SDRC, 2000 Eastman Dr., Milford, OH  45150-2789  513-576-2070
larry.jones@sdrc.com
When you're as far ahead of the class as I am, it doesn't take much time.
-- Calvin
Technical Details
Message-ID: <44ha0s$38l@info1.sdrc.com>
Path: arc1-ca.pugleaf.net!sdrc.com!thor!scjones
References: <44fkc3$hj3@news0.rain.rg.net>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sdrc.com!thor!scjones
From: larry.jones@sdrc.com (Larry Jones)
Newsgroups: comp.std.c
Subject: Re: Composite type of incompatible parameter types
Date: 29 Sep 1995 17:22:36 GMT
Organization: SDRC Engineering Services
Distribution: world
Message-ID: <44ha0s$38l@info1.sdrc.com>
References: <44fkc3$hj3@news0.rain.rg.net>
NNTP-Posting-Host: thor.sdrc.com
Originator: scjones@thor