Path: csiph.com!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Jens Gustedt Newsgroups: comp.lang.c Subject: Re: GCC is re-implementing in C++ and C discarded Date: Tue, 28 Aug 2012 09:01:45 +0200 Organization: A noiseless patient Spider Lines: 28 Message-ID: <503C6CD9.3050509@loria.fr> References: <5ae847c6-461f-4243-86bb-5712b158b022@googlegroups.com> <7IqdnYpQqOi476vNnZ2dnUVZ_rednZ2d@giganews.com> <36a33495-6dbd-49bc-a36e-59dd1f479902@k3g2000yqo.googlegroups.com> <12c3eb3a-f1a9-493b-a58b-c572729ec037@googlegroups.com> <371dad4b-a842-42d9-9716-98b48f9a8335@googlegroups.com> <503B9FDD.3040305@verizon.net> <503BB07E.8070109@verizon.net> <8aQ_r.202661$GZ3.178925@tornado.fastwebnet.it> <503BD05A.9030804@loria.fr> <503BFAD7.30202@loria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Injection-Info: mx04.eternal-september.org; posting-host="2590e4fa64e7931a8f955de6703c052f"; logging-data="11135"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18h3v65jl1wMoZ8B+42qCOjMWm2l91ht5M=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 In-Reply-To: Cancel-Lock: sha1:T4LxSOsUIiVDpFiq8V9AL9rRBsw= Xref: csiph.com comp.lang.c:25193 Am 28.08.2012 01:43, schrieb Keith Thompson: > Jens Gustedt writes: > And if `void foo() { }` does provide a prototype, then *that* > needs to be made clearer; there are a lot of compilers that fail > to warn about calls like `foo(42)`. Please re-read what I have stated in my previous post. The definition of the term function prototype is not given syntactically but semantically: a declaration of a function that declares the types of its parameters, that's it. void foo() { } perfectly fits this definition, so this declaration includes a prototype. The only nitpick that you could find here is the use of "specifies" versus "declares", so one could want to do a corrigendum 6.7.6.3p14: "An empty list in a function declarator that is part of a definition of that function *declares* that the function has no parameters." But you'd have to do a lot of hairsplitting to actually see the difference between a "declaration that specifies something" and a "declaration that declares something". Jens