I noticed that it\'s possible to have const qualifier on a value argument present in the function declaration and then omitted in the definition. That doesn\'t
This is a bug because it prevents legitimate code like:
/* API declaration */
void f(int);
/* Implementation */
void f(const int x) /* my business: x is my local var and I want it const */
{
}
I can't believe anyone would code out of their way to diagnose this as a problem.
Incidentally, GCC, which doesn't complain about this, used to have a warning about this situation. Perhaps it still does:
void f(int func_ptr(void));
void f(int (*func_ptr)(void))
{
}
This is purely a stylistic inconsistency that doesn't serve a purpose, though.