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

--- Comment #4 from Tom Tromey <tromey at gcc dot gnu.org> ---
Note that it is also wrong in the initializer case.

enum e f(void)
{
  enum e result = 0;

  return result;
}


barimba. gcc --syntax-only -Wc++-compat r.c
r.c: In function ‘f’:
r.c:5:8: warning: enum conversion in initialization is invalid in C++
[-Wc++-compat]
   enum e result = 0;
        ^

Reply via email to