On 06/01/2016 10:39 AM, Jakub Jelinek wrote:
On Wed, Jun 01, 2016 at 02:44:22PM +0200, Marcin Baczyński wrote:
On 1 Jun 2016 14:07, "Jakub Jelinek" <ja...@redhat.com> wrote:

On Wed, Jun 01, 2016 at 01:55:04PM +0200, Marcin Baczyński wrote:
PR c/48116.

Botstrapped and tested on x86_64-pc-linux-gnu.

gcc/ChangeLog:

    * c/c-typeck.c (c_finish_return): emit warning about return with a
     void expression in a function returning void if warn_return_type.

This is a GNU extension, so I fail to see why you should warn.

The bug is on the easyhacks list, I thought it would be a good place to
start digging into the GCC code base.

First of all, I'm not the C FE maintainer, so these are just IMHO comments,
the maintainers might have different opinion.

Do you have any suggestions for better things to start with?

Since you've done a lot of work on this bug already I think it
would be worthwhile to see it through to completion.  Given that,
as Jakub mentioned, the absence of the warning in permissive mode
(i.e. without -Wpedantic) is a GCC extension to C, it would be
helpful to mention it in the manual (doing so would resolve the
submitter's complaint that the -Wreturn-type option doesn't work
as documented).  With the documentation patch accepted, the bug
can then be closed as resolved/fixed and taken off the easy hacks
list.

Martin

Reply via email to