https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61379

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-02-16
                 CC|                            |msebor at gcc dot gnu.org
     Ever confirmed|0                           |1
      Known to fail|                            |4.1.3, 4.2.2, 4.3.2, 4.6.0,
                   |                            |5.3.0, 6.3.0, 7.0

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
Confirmed with today's trunk of GCC 7.0.  It doesn't appear to have ever worked
as expected.

$ cat t.C && gcc -S -Wall -Wextra -Wpedantic t.C
struct A {
  virtual void f () __attribute__((noreturn)) = 0;
  virtual void g [[noreturn]] () = 0;
};

int foo (A *a)
{
  a->f ();
}

int bar (A *a) 
{
  a->g ();
}


t.C: In function ‘int foo(A*)’:
t.C:9:1: warning: no return statement in function returning non-void
[-Wreturn-type]
 }
 ^
t.C: In function ‘int bar(A*)’:
t.C:14:1: warning: no return statement in function returning non-void
[-Wreturn-type]
 }
 ^

Reply via email to