This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/83397] void f() { } has zero arguments
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 12 Dec 2017 22:24:42 +0000
- Subject: [Bug c/83397] void f() { } has zero arguments
- Auto-submitted: auto-generated
- References: <bug-83397-4@http.gcc.gnu.org/bugzilla/>
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>.