summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/expr/unary3.C
blob: abca0322d29e17165ba21a8dd9ec23828a3f7004 (plain)
1
2
3
4
5
6
7
8
9
10
11
// PR c++/41131
// { dg-do compile }

struct X { enum E { a = 100 }; };

int
main ()
{
  X x;
  (void) &x.a;    // { dg-error "lvalue required" }
}