public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/48116] New: -Wreturn-type does not work as advertised
@ 2011-03-14 17:08 tromey at gcc dot gnu.org
  2011-03-14 17:18 ` [Bug c/48116] " pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: tromey at gcc dot gnu.org @ 2011-03-14 17:08 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48116

           Summary: -Wreturn-type does not work as advertised
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: tromey@gcc.gnu.org


I'm using svn trunk gcc as of today.

-Wreturn-type is documented as:

  [... warn] about a `return' statement with a expression
  in a function whose return-type is `void'.

I tried it with this test case:

void x (void) { }
void y(void) { return x(); }

I expected a warning on the `return', but did not get one:

I used "gcc -Wreturn-type -O2 -c q.c"


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-07-16  9:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-14 17:08 [Bug c/48116] New: -Wreturn-type does not work as advertised tromey at gcc dot gnu.org
2011-03-14 17:18 ` [Bug c/48116] " pinskia at gcc dot gnu.org
2011-03-14 17:21 ` tromey at gcc dot gnu.org
2014-09-24 18:03 ` mpolacek at gcc dot gnu.org
2014-10-18 10:55 ` mpolacek at gcc dot gnu.org
2015-04-22 12:00 ` jakub at gcc dot gnu.org
2015-07-16  9:12 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).