Why is -Wold-style-definition off by default?

Antons Suspans antox@ml.lv
Mon Oct 30 12:20:00 GMT 2017


Hello!

Why is -Wold-style-definition off by default and not implied by -Wall,
-Wextra? The following code might be a marginal example, which is
compiled without warning about missing prototype and unchecked args
(gcc-5.3.0 -Wall -Wextra ex.c).

void f(x)
	int x;
{ }

int main(void) {
	f(1.0);
	return 0;
}

Thanks,

Antons



More information about the Gcc-help mailing list