Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | James Kuyper <jameskuyper@verizon.net> |
| Newsgroups | comp.lang.c |
| Subject | Re: Function Prototypes: Necessary or just good practice? |
| Date | Tue, 14 Feb 2012 17:51:59 -0500 |
| Organization | A noiseless patient Spider |
| Lines | 31 |
| Message-ID | <4F3AE58F.30306@verizon.net> (permalink) |
| References | <jhcq3f$sch$1@news.albasani.net> <4f39ffba$0$18696$91cee783@newsreader03.highway.telekom.at> <0.0a779e9afa88a1fc008c.20120214131443GMT.87aa4l36bg.fsf@bsb.me.uk> <bc49de91-a461-4bf6-9331-77a23bf60e03@vd8g2000pbc.googlegroups.com> <4F3AD9D1.1030207@verizon.net> <0.3ce234b7f30119f3e5a4.20120214223533GMT.877gzp11sa.fsf@bsb.me.uk> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 7bit |
| Injection-Info | mx04.eternal-september.org; posting-host="2P71cupDoazVVolqpw1jrw"; logging-data="4165"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19B8ha8McC4M0iglyFswoY1ZU1JYbroqqA=" |
| User-Agent | Mozilla/5.0 (X11; Linux i686; rv:9.0) Gecko/20111220 Thunderbird/9.0 |
| In-Reply-To | <0.3ce234b7f30119f3e5a4.20120214223533GMT.877gzp11sa.fsf@bsb.me.uk> |
| Cancel-Lock | sha1:IstUsUV1avnqPq7t9rMIi2XCDec= |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.c:17339 |
Show key headers only | View raw
On 02/14/2012 05:35 PM, Ben Bacarisse wrote: > James Kuyper <jameskuyper@verizon.net> writes: > >> On 02/14/2012 04:47 PM, Peter Nilsson wrote: >>> Ben Bacarisse <ben.use...@bsb.me.uk> wrote: >>>> In C99 implicit declarations are not permitted. >>> >>> They're no longer required, but if a C99+ implementation >>> decides to support them anyway, no diagnostic is required >>> for their use. >> >> Its a constraint violation - 6.7.2p2: "At least one type specifier shall >> be given in the declaration specifiers in each declaration, >> and in the specifier-qualifier list in each struct declaration and type >> name." Therefore a diagnostic is required. > > I don't think he's talking about implicit int. I certainly wasn't. Calling a function without a declaration in scope is a constraint violation (6.5.2.2p2). If an actual declaration is present, an implied one is unnecessary (except when the implicit int rule was in effect, which it no longer is). So if an implicit declaration is needed, there's either a constraint violation in the declaration of the function or in the call of the function. > However, I still think it's a constraint violation. I think 6.5.1 p2 > and 6.5.2.2 p1 conspire to make it so (either on it's is probably > enough). 6.5.2.2p1 is the one that seems relevant to me.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Function Prototypes: Necessary or just good practice? /dev/phaeton <blahbleh666@no_more_spam.hotmail.com> - 2012-02-13 23:05 -0600
Re: Function Prototypes: Necessary or just good practice? Johann Klammer <klammerj@NOSPAM.a1.net> - 2012-02-14 07:31 +0100
Re: Function Prototypes: Necessary or just good practice? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-02-14 13:14 +0000
Re: Function Prototypes: Necessary or just good practice? Ralf Damaschke <rwspam@gmx.de> - 2012-02-14 16:20 +0000
Re: Function Prototypes: Necessary or just good practice? Peter Nilsson <airia@acay.com.au> - 2012-02-14 13:47 -0800
Re: Function Prototypes: Necessary or just good practice? James Kuyper <jameskuyper@verizon.net> - 2012-02-14 17:01 -0500
Re: Function Prototypes: Necessary or just good practice? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-02-14 22:35 +0000
Re: Function Prototypes: Necessary or just good practice? James Kuyper <jameskuyper@verizon.net> - 2012-02-14 17:51 -0500
Re: Function Prototypes: Necessary or just good practice? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-02-15 00:06 +0000
Re: Function Prototypes: Necessary or just good practice? Peter Nilsson <airia@acay.com.au> - 2012-02-14 20:27 -0800
Re: Function Prototypes: Necessary or just good practice? Keith Thompson <kst-u@mib.org> - 2012-02-14 22:24 -0800
Re: Function Prototypes: Necessary or just good practice? Stephen Sprunk <stephen@sprunk.org> - 2012-02-14 01:18 -0600
Re: Function Prototypes: Necessary or just good practice? Philip Lantz <prl@canterey.us> - 2012-02-14 00:05 -0800
Re: Function Prototypes: Necessary or just good practice? Kaz Kylheku <kaz@kylheku.com> - 2012-02-14 09:09 +0000
Re: Function Prototypes: Necessary or just good practice? /dev/phaeton <blahbleh666@no_more_spam.hotmail.com> - 2012-02-14 23:51 -0600
Re: Function Prototypes: Necessary or just good practice? Kaz Kylheku <kaz@kylheku.com> - 2012-02-15 06:36 +0000
Re: Function Prototypes: Necessary or just good practice? James Kuyper <jameskuyper@verizon.net> - 2012-02-15 08:31 -0500
csiph-web