Drop special treatment of functions with the empty parameter list #556
Labels
area:compiler
Related to code compilation or type checking
area:standard-support
Related to the C standard support
kind:feature
New feature or request
status:help-wanted
Open for contributors
C23 has dropped the requirement of special treatment for the functions with empty parameter list, such as:
In previous versions of the standard, this would introduce a function declaration with a lax parameter list, meaning the caller can call it while passing any parameters.
In C23, this is no longer the case, and declarations such as
void foo();
andvoid foo(void);
are strictly identical: they declare a function with no parameters.For a summary of changes, see Annex M, M.2 Fifth Edition:
See also proposal N2841 that's been accepted.
This unfortunate behavior has been causing a fair amount of pain for implementing the previous standard versions in Cesium, so I am glad we could finally drop it.
The text was updated successfully, but these errors were encountered: