* cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.law / cvt11.C
blob383cded430b0f4fa7bca8db3713112fd33bb356f
1 // { dg-do assemble  }
2 // GROUPS passed conversions
3 // cvt file
4 // Date: Tue, 10 Nov 92 11:08:08 PST
5 // From: rrh@tera.com (Robert R. Henry)
6 // Message-Id: <9211101908.AA13557@tera.com>
7 // Subject: type cast of qualified const member breaks g++2.3.1
9 #include <stdio.h>
11 class Thing{
12 private: int x;
13 public: const int N = -1; // { dg-error "" "" { target { ! c++11 } } } bad initialization
14   Thing(int y);
17 class Bar{ public: void doit(void); };
19 void Bar::doit(void)
21   int i, j;
22   i = Thing::N;                 // { dg-error "non-static" }
23   printf("i = %d\n", i);
25   j = (int)Thing::N;            // { dg-error "non-static" }
26   printf("i = %d\n", j);
28 Thing::Thing(int y) { x = y; }
29 int main(){ Bar x; x.doit(); }