On 12.05.23 09:53, Eli Zaretskii via Gcc wrote:
I described in an earlier message how this breakage looks in real
life, and why it causes a lot of frustration.  The main problem is
discovering that things broke because GCC defaults, and then
discovering how to pacify GCC with the least effort.

Gcc is quite helpful these days:

$ gcc -c example.c
example.c:1:1: warning: data definition has no type or storage class
    1 | a();
      | ^
example.c:1:1: warning: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
$ gcc -Werror -c example.c
example.c:1:1: error: data definition has no type or storage class [-Werror]
    1 | a();
      | ^
example.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Werror=implicit-int]

(sorry, cannot show the nice coloring).

It tells you right in the error message which option caused the
or warning in question.  This is not hard.

Is your opinion that reading error messages (and making the mental
leap of adding the negative, of course) is too much to expect?

Best regards

        Thomas

Reply via email to