summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/regress/ext-label10.C
blob: 652d94af0365c6da433418c2a8cd439a2d2486c4 (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 "-std=gnu++0x" }

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:;
}