https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121907

--- Comment #5 from Alejandro Colomar <foss+...@alejandro-colomar.es> ---
Oh, for some reason I thought implicit int had been entirely removed from GCC. 
It's indeed only a default error for new dialects, but not for old ones.

alx@debian:~/tmp$ cat implicit.c 
main(void)
{
        return 0;
}
alx@debian:~/tmp$ gcc -std=c89 -Wall -Wextra implicit.c 
implicit.c:1:1: warning: return type defaults to ‘int’ [-Wreturn-type]
    1 | main(void)
      | ^~~~
alx@debian:~/tmp$ gcc implicit.c 
implicit.c:1:1: error: return type defaults to ‘int’ [-Wimplicit-int]
    1 | main(void)
      | ^~~~


Hmmm.  Yeah, then I guess it makes sense to keep auto around in those modes.

Reply via email to