[Bug c/113011] main declared with enumerated type is not accepted

2023-12-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113011 --- Comment #4 from Andrew Pinski --- C23 working draft can be found at https://open-std.org/JTC1/SC22/WG14/www/docs/n3096.pdf .

[Bug c/113011] main declared with enumerated type is not accepted

2023-12-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113011 Andrew Pinski changed: What|Removed |Added Resolution|--- |INVALID Status|UNCONFIRMED

[Bug c/113011] main declared with enumerated type is not accepted

2023-12-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113011 --- Comment #2 from Andrew Pinski --- >From C99 draft: 5.1.2.2.1 Program startup The function called at program startup is named main.The implementation declares no prototype for this function. It shall be defined with a return type ofintand wit

[Bug c/113011] main declared with enumerated type is not accepted

2023-12-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113011 --- Comment #1 from Andrew Pinski --- clang even errors out: :6:1: error: 'main' must return 'int' 6 | enum E main(){} | ^~ | int