Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Empty parentheses

Thread Tools

Empty parentheses

Jeremy Yallop
Posts: n/a
Arthur J. O'Dwyer wrote:
> On Fri, 17 Oct 2003, Mark A. Odell wrote:
>> Removed) (Dan Pop) wrote in news:bmp4b3$b8r$(E-Mail Removed):
>> [Mark A. Odell wrote:]
>> >>
>> >>No, it doesn't. It means use the first-encountered usage to complete
>> >>the prototype.
>> >
>> > Nope, it doesn't. It means this definition/declaration doesn't
>> > provide a prototype for this function.

>> What should I have said?

> From Dan's response, I gather that you should have said,
> "No, it doesn't. It means use the first encountered *prototype*
> to complete the prototype, and *until then* just assume that the
> user wants the default promotions applied to the arguments in
> any calls to that function."

Still not quite right, I'm afraid. Going by the OP's example code
we're talking about an empty argument list in a function /definition/.
In this case the function is defined to take no arguments, and calls
to the function which supply arguments have undefined behaviour (and
so need not be diagnosed) unless there's a separate prototype in scope
in which case such calls violate a constraint.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
"Can't use parentheses when calling a Sub" help...... ASP .Net 7 05-17-2006 04:44 PM
Calling Function Without Parentheses! Kamilche Python 11 01-08-2005 04:58 AM
Why tuples use parentheses ()'s instead of something else like <>'s? Python 44 01-06-2005 10:11 AM
'AddressOf' operand must be the name of a method; no parentheses a =?Utf-8?B?UGF0cmljay5PLklnZQ==?= ASP .Net 15 10-18-2004 11:49 PM
Parentheses in the control expression Memana C++ 1 07-05-2004 02:37 PM