This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/83397] void f() { } has zero arguments


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83397

--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
DR#317 explicitly confirms that () is not a prototype in a function 
definition.

It's not valid in ISO C to call a variadic function without a prototype in 
scope.  To the extent that GCC allows for it, presumably it's for 
compatibility with code that e.g. calls printf without including 
<stdio.h>.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]