M
macracan
I'm wondering what was the rationale that caused gcc to only have a
warning (disabled by default!!) to signal the following:
int a()
{}; // intentionally no statements
int main()
{
printf("%d", a());
return 0;
}
Function a() is declared as returning an int and the compiler doesn't
treat as an error the missing return statement.
I'm asking in this forum because I suspect that gcc crowd will just
tell me to read the standard. If I'm in the wrong forum, I hope to be
corrected.
Thank you,
Adrian
warning (disabled by default!!) to signal the following:
int a()
{}; // intentionally no statements
int main()
{
printf("%d", a());
return 0;
}
Function a() is declared as returning an int and the compiler doesn't
treat as an error the missing return statement.
I'm asking in this forum because I suspect that gcc crowd will just
tell me to read the standard. If I'm in the wrong forum, I hope to be
corrected.
Thank you,
Adrian