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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |msebor at gcc dot gnu.org
      Known to fail|4.1.0                       |4.1.3, 4.3.5, 4.4.7, 4.8.5,
                   |                            |4.9.4, 5.4.0, 6.4.0, 7.3.0,
                   |                            |8.2.0, 9.0

--- Comment #7 from Martin Sebor <msebor at gcc dot gnu.org> ---
No change in GCC 9.  The problem affects both C and C++.

$ cat pr21678.C && gcc -S -Wall -Wextra -xc pr21678.C
static inline __attribute__((always_inline)) int foo(int a)
{
  if (a==0)
     return 0;
}


Clang issues the expected diagnostic in both modes:

$ clang -S pr21678.C 
pr21678.C:5:1: warning: control may reach end of non-void function
      [-Wreturn-type]
}
^
1 warning generated.

Reply via email to