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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [other/] [error8.C] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do compile }
2
// Contributed by: Michael Elizabeth Chastain
3
//   
4
// PR c++/13927: Wrong error message for redeclartion of type from union
5
 
6
void foo(void)
7
{
8
  union { int alpha; int beta; }; // { dg-error "previous declaration" }
9
  double alpha;  // { dg-error "conflicting declaration" }
10
}
11
 
12
// This checks both the templated version, and the position of the diagnostic
13
//  (which is currently wrong).
14
template 
15
void tfoo(void)
16
{
17
  union {
18
    int alpha;  // { dg-error "" "" { xfail *-*-* } }
19
    int beta;
20
  }; // { dg-bogus "" "misplaced position of the declaration" { xfail *-*-* } }
21
  double alpha; // { dg-error "" "" }
22
}

powered by: WebSVN 2.1.0

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