This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/53232] No warning for main() without a return statement with -std=c99
- From: "vincent-gcc at vinc17 dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 04 May 2012 19:58:01 +0000
- Subject: [Bug c/53232] No warning for main() without a return statement with -std=c99
- Auto-submitted: auto-generated
- References: <bug-53232-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53232
--- Comment #8 from Vincent LefÃvre <vincent-gcc at vinc17 dot net> 2012-05-04 19:58:01 UTC ---
(In reply to comment #6)
> Yes, and in each case some people want it and some don't. I'm pointing out to
> Manu the reasons not everyone wants the warning. Your opinion isn't the only
> valid one.
Then the solution would be to split -Wreturn-type into two different warnings.
> Er, if you want to find portability problems for people not using C99 then
> don't use -std=c99. Then -Wreturn-type warns about main.
There are several reasons one may want to use -std=c99, e.g. to be able to use
C99 features when available (via autoconf and/or preprocessor tests).