This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/53232] No warning for main() without a return statement with -std=c99


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).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]