annotate gcc/testsuite/gcc.dg/pr61162.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* PR c/61162 */
kono
parents:
diff changeset
2 /* { dg-do compile } */
kono
parents:
diff changeset
3 /* { dg-options "-Wc++-compat" } */
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 enum e { A };
kono
parents:
diff changeset
6 enum e
kono
parents:
diff changeset
7 fn1 (void)
kono
parents:
diff changeset
8 {
kono
parents:
diff changeset
9 enum e e, q = 0; /* { dg-warning "17:enum conversion from 'int' to 'enum e' in initialization is invalid" } */
kono
parents:
diff changeset
10 e = 0; /* { dg-warning "5:enum conversion from 'int' to 'enum e' in assignment is invalid" } */
kono
parents:
diff changeset
11 1; return 0; /* { dg-warning "13:enum conversion from 'int' to 'enum e' in return is invalid" } */
kono
parents:
diff changeset
12 }