view gcc/testsuite/gcc.dg/pr61162.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* PR c/61162 */
/* { dg-do compile } */
/* { dg-options "-Wc++-compat" } */

enum e { A };
enum e
fn1 (void)
{
  enum e e, q = 0; /* { dg-warning "17:enum conversion from 'int' to 'enum e' in initialization is invalid" } */
  e = 0; /* { dg-warning "5:enum conversion from 'int' to 'enum e' in assignment is invalid" } */
  1; return 0; /* { dg-warning "13:enum conversion from 'int' to 'enum e' in return is invalid" } */
}