Article View: comp.std.c
Article #1642Re: Parameter Types in Old-Style Function Definitions
From: Doug Gwyn
Date: Wed, 05 Sep 1990 15:44
Date: Wed, 05 Sep 1990 15:44
14 lines
989 bytes
989 bytes
In article <10391@pt.cs.cmu.edu> hjelm@g.gp.cs.cmu.edu (Mark Hjelm) writes:
-What is the compiler allowed/required to do for this:
- f(a, b)
- float a;
- char b;
- {
- }
-Is the type of "a" (as seen inside of "f") float or double or either?
-Is the type of "b" char or int or either?
Assuming the absence of any prototype for this function, its actual
arguments would be passed as double and int, which upon entry to the
function would be in effect assigned to local variables a and b
having types float and char, respectively.
Technical Details
Message-ID:
<13748@smoke.BRL.MIL>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!adm!smoke!gwynReferences:
<10391@pt.cs.cmu.edu>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: Parameter Types in Old-Style Function Definitions Keywords: parameter, function Message-ID: <13748@smoke.BRL.MIL> Date: 5 Sep 90 15:44:13 GMT References: <10391@pt.cs.cmu.edu> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 14