Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Ian Collins Newsgroups: comp.lang.c Subject: Re: Octal Date: Mon, 2 Jan 2017 09:02:13 +1300 Lines: 24 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net 0/FglSlHAoyChTeqo4DWFQxTtHNItzBFDbwM7UcjvWjtt2wdZl Cancel-Lock: sha1:g+smE3BPs4KMjopnSyf9z+9WWLI= User-Agent: Mozilla/5.0 (X11; SunOS i86pc; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 In-Reply-To: Xref: csiph.com comp.lang.c:100807 On 01/ 2/17 08:54 AM, Stefan Ram wrote: > Ian Collins writes: >> I wonder why C hasn't adopted the simple rule from C++: if a parameter >> isn't going to be used, don't give it a name. > > There's a style checker for C++ in clang, and when I write: > > int f( int ){} > > , it tells me: > > warning: all parameters should be named in a function > [readability-named-parameter] It should be telling that control reaches end of non-void function... cat /tmp/x.cc; clang++ -c /tmp/x.cc -Wall -Wextra; clang++ --version int f( int ) { return 0; } void g( int ) {} clang version 4.0.0-svn287013-1~exp1 (trunk) -- Ian