🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1494

Re: compatibility of types

#1494
From: Doug Gwyn
Date: Wed, 11 Jul 1990 20:12
15 lines
1186 bytes
In article <1990Jul11.002522.24178@ccu.umanitoba.ca> rpjday@ccu.umanitoba.ca writes:
>  Can someone tell me if ANSI C considers a type of int[3] in
>a prototype compatible with a type of int[5] in the function
>definition?  And are these compatible with a type of int*?
>A reference to the draft would do nicely (this is a subtle
>way of saying that I would RTFM if I knew which section of
>TFM was what I wanted :-)

It's hard to see how you could not find this:

3.5.4.3 (Funtion Declarators (Incuding Prototypes):  For two function
types to be compatible, ... corresponding parameters shall have
compatible types. ... (For each parameter declared with function or
array type, its type for these comparisons is the one that results
from conversion to a pointer type, as in 3.7.1. ...
Technical Details
Message-ID: <13342@smoke.BRL.MIL>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!adm!smoke!gwyn
References: <1990Jul11.002522.24178@ccu.umanitoba.ca>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!adm!smoke!gwyn
From: gwyn@smoke.BRL.MIL (Doug Gwyn)
Newsgroups: comp.std.c
Subject: Re: compatibility of types
Message-ID: <13342@smoke.BRL.MIL>
Date: 11 Jul 90 20:12:01 GMT
References: <1990Jul11.002522.24178@ccu.umanitoba.ca>
Organization: U.S. Army Ballistic Research Laboratory, APG, MD.
Lines: 15