This is the mail archive of the
mailing list for the GCC project.
Re: Enable -Wreturn-type by default ?
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Sylvestre Ledru <sylvestre at debian dot org>
- Cc: Jonathan Wakely <jwakely dot gcc at gmail dot com>, Dodji Seketeli <dodji at seketeli dot org>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>
- Date: Thu, 23 Jan 2014 16:34:52 +0000
- Subject: Re: Enable -Wreturn-type by default ?
- Authentication-results: sourceware.org; auth=none
- References: <5283ABF2 dot 5010209 at debian dot org> <871u2jw776 dot fsf at seketeli dot org> <CAH6eHdRUrCrSsEV9ckq73QhTb0O-XREjN58Lv7xJfgk_0bH2eQ at mail dot gmail dot com> <5288E375 dot 4000907 at debian dot org> <CAH6eHdRmwurQXdRP+yB4WYu0U0jHxezBhnQAqwtrucnqnvL+0g at mail dot gmail dot com> <52D7BE77 dot 8090300 at debian dot org> <CAH6eHdTKCxajpj9U0nE7kAQNOQch1sFCUTGp4aPNQvcO-q0FAg at mail dot gmail dot com> <52E0BC1A dot 7010403 at debian dot org>
On Wed, 22 Jan 2014, Sylvestre Ledru wrote:
> Actually, I wonder if -Wmissing-return should not be included by default ...
I don't think that's appropriate for C; control reaching the end of a
function is quite likely to mean simply that the user is writing C90 / C99
code without annotations for noreturn functions (so control can't actually
reach the end of the function but GCC can't tell that).
Joseph S. Myers