https://bugs.llvm.org/show_bug.cgi?id=41851

Richard Smith <richard-l...@metafoo.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|NEW                         |RESOLVED

--- Comment #1 from Richard Smith <richard-l...@metafoo.co.uk> ---
GCC is wrong. The definitions of g, h, and i are not unprototyped functions.

C11 6.7.6.3 paragraph 14:

"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:

void f(); // unprototyped
void g() {} // equivalent to 'void g(void) {}'

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to