I came across this code in the wild and got very confused.
#ifdef __STDC__
double cos(double x)
#else
double cos(x)
double x;
#endif
{
// ...
}
I fail to see why the latter in the #else
would be preferable in any circumstances. Are there any reasons to write function definitions as above as opposed to the very standard and widely accepted way as shown below?
double cos(double x) {
// ...
}