lkml.org 
[lkml]   [2012]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] checkpatch.pl: thou shalt not use () or (...) in function declarations
On 03/22/2012 05:55 PM, Jiri Slaby wrote:
> On 03/22/2012 05:49 PM, Valdis.Kletnieks@vt.edu wrote:
>> On Thu, 22 Mar 2012 17:22:33 +0100, Jiri Slaby said:
>>> That explanation is not fully correct. C99 explicitly says
>>> (6.7.5.3.14): An identifier list declares only the identifiers of
>>> the parameters of the function. An empty list in a function
>>> declarator that is part of a definition of that function
>>> specifies that the function has no parameters. The empty list in
>>> a function declarator that is not part of a definition of that
>>> function specifies that no information about the number or types
>>> of the parameters is supplied.
>>>
>>> So what you are trying to force here holds only for (forward)
>>> declarations. Not for functions with definitions (bodies). Is
>>> checkpatch capable to differ between those?
>>
>> The fact that 'int foo() { /*whatever*/ }' with an empty parameter
>> list is *legal* doesn't mean that we can't collectively put our
>> foot down and say "This is too ugly to live in our source tree".

And I pointed that out because I didn't want people to start converting
such uses in batches now.

thanks,
-- js suse labs




\
 
 \ /
  Last update: 2012-03-22 18:03    [W:0.048 / U:3.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site