>>1,13
I'm not sure if your code actually violates the standard or if GCC is misdiagnosing, but it doesn't matter. You should never use empty parentheses in function declarators in new C code. This is leftover kludge from C's pre-C89 days, and is still present in the language only for backwards compatibility.
Here's why you don't want do this (C99 6.5.2.2p6):
[quote]If the expression that denotes the called function has a type that does not include a prototype, the integer promotions are performed on each argument, and arguments that have type float are promoted to double. These are called the default argument promotions. If the number of arguments does not equal the number of parameters, the behavior is undefined. If the function is defined with a type that includes a prototype, and either the prototype ends with an ellipsis or the types of the arguments after promotion are not compatible with the types of the parameters, the behavior is undefined. ...[/quote]
This makes subtle bugs. The way your code is now, the compiler will be happy with any of the following calls, but all of them invoke undefined behavior:
-
toto()
-
toto(0)
-
toto((char)0)
-
toto(0,0)
Always write the list of the parameter types, or
(void) if there are no parameters.