Article View: comp.std.c
Article #2421Re: ANSI prototypes, the right choice...
From: Peter da Silva
Date: Wed, 13 Feb 1991 10:51
Date: Wed, 13 Feb 1991 10:51
17 lines
1443 bytes
1443 bytes
In article <1991Feb11.164636.22675@zoo.toronto.edu> henry@zoo.toronto.edu (Henry Spencer) writes: > How curious; an ANSI-conforming compiler has to accept mixtures. Given > some attention to parameter types, a program which prototypes a function and > then gives an old-style definition of it is completely, 100% ANSI-conforming, > and any compiler which refuses to accept it is not. I think the key here is the phrase "Given some attention to parameter types". That is, "int foo(int, int);" is compatible with "int foo(a, b) char a, b;", but "int foo(char, char);" isn't. A compiler that accepts the latter as compatible with a non-prototyped definition without so much as a warning isn't ANSI compliant, no? And it's that usage that's causing the problem. -- Peter da Silva. `-_-' <peter@sugar.hackercorp.com>.
Technical Details
Message-ID:
<1991Feb13.105147.463@sugar.hackercorp.com>Path:
arc1-ca.pugleaf.net!utzoo!attcan!telly!lethe!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod.mps.ohio-state.edu!lavaca.uh.edu!menudo.uh.edu!lobster!sugar!peterReferences:
<1991Feb9.075215.26939@athena.mit.edu> <1991Feb11.030811.25074@sugar.hackercorp.com> <1991Feb11.164636.22675@zoo.toronto.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!telly!lethe!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod.mps.ohio-state.edu!lavaca.uh.edu!menudo.uh.edu!lobster!sugar!peter From: peter@sugar.hackercorp.com (Peter da Silva) Newsgroups: comp.std.c,comp.sys.amiga.programmer Subject: Re: ANSI prototypes, the right choice... Message-ID: <1991Feb13.105147.463@sugar.hackercorp.com> Date: 13 Feb 91 10:51:47 GMT References: <1991Feb9.075215.26939@athena.mit.edu> <1991Feb11.030811.25074@sugar.hackercorp.com> <1991Feb11.164636.22675@zoo.toronto.edu> Organization: Sugar Land Unix -- Houston, TX Lines: 17