[Bug c++/83797] Inconsistent error messages for main
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Apr 2 10:20:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83797
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #3)
> Another related problem is that this should highlight the return type, not
> the closing paren:
>
> vm.cc:1:11: error: ‘::main’ must return ‘int’
> void main() { }
> ^
FWIW the C front-end highlights the function name not the return type:
vm.c:1:6: warning: return type of ‘main’ is not ‘int’ [-Wmain]
void main() { }
^~~~
More information about the Gcc-bugs
mailing list