summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/bool3.C
blob: 4e31003ce964db798839ad7e5d59e1678ccb6df5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// { dg-do assemble  }
// From: panisset@cae.ca (Jean-Francois Panisset)
// Subject: Problem with constant expressions for bitfields
// Date: Mon, 6 Jun 94 14:00:01 EDT

// Bug: g++ doesn't treat boolean true and false as constant values.

enum E { e1,e2,e3,e4,e5 };

struct X
{
        unsigned int bits : ((e5 > 4) ? 8 : 4);	// { dg-bogus "" } constant expression
};