summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/label10.C
blob: 632b2426ed51c2934f04eb249a71728422a9bdc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// PR c++/33836
// { dg-do compile }
// { dg-options "" }

template<int N> struct A
{
  enum { M = && N };	// { dg-error "referenced outside|cannot appear in|not an integer constant" }
};

A<0> a;

void foo ()
{
  __label__ P;
  enum { O = && P };	// { dg-error "cannot appear in|not an integer constant" }
  P:;
}