OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [union1.C] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// Negative test for C++0x unrestricted unions
2
// { dg-options -std=c++0x }
3
// { dg-prune-output "implicitly deleted because" }
4
 
5
struct A
6
{
7
  A();
8
  A(const A&);
9
  ~A();
10
};
11
 
12
union B
13
{
14
  A a;                          // { dg-error "union member" }
15
};
16
 
17
B b;                            // { dg-error "B::B\\(\\)" }
18
B b2(b);                        // { dg-error "B::B\\(const B&\\)" }
19
 
20
struct C
21
{
22
  union
23
  {
24
    A a;                        // { dg-error "union member" }
25
  };
26
};
27
 
28
C c;                            // { dg-error "C::C\\(\\)" }
29
C c2(c);                        // { dg-error "C::C\\(const C&\\)" }
30
 
31
// { dg-error "B::~B" "" { target *-*-* } 17 }
32
// { dg-error "B::~B" "" { target *-*-* } 18 }
33
// { dg-error "C::~C" "" { target *-*-* } 28 }
34
// { dg-error "C::~C" "" { target *-*-* } 29 }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.