URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
// { dg-do compile }
|
// { dg-do compile }
|
// Contributed by: Michael Elizabeth Chastain
|
// Contributed by: Michael Elizabeth Chastain
|
//
|
//
|
// PR c++/13927: Wrong error message for redeclartion of type from union
|
// PR c++/13927: Wrong error message for redeclartion of type from union
|
|
|
void foo(void)
|
void foo(void)
|
{
|
{
|
union { int alpha; int beta; }; // { dg-error "previous declaration" }
|
union { int alpha; int beta; }; // { dg-error "previous declaration" }
|
double alpha; // { dg-error "conflicting declaration" }
|
double alpha; // { dg-error "conflicting declaration" }
|
}
|
}
|
|
|
// This checks both the templated version, and the position of the diagnostic
|
// This checks both the templated version, and the position of the diagnostic
|
// (which is currently wrong).
|
// (which is currently wrong).
|
template
|
template
|
void tfoo(void)
|
void tfoo(void)
|
{
|
{
|
union {
|
union {
|
int alpha; // { dg-error "" "" { xfail *-*-* } }
|
int alpha; // { dg-error "" "" { xfail *-*-* } }
|
int beta;
|
int beta;
|
}; // { dg-bogus "" "misplaced position of the declaration" { xfail *-*-* } }
|
}; // { dg-bogus "" "misplaced position of the declaration" { xfail *-*-* } }
|
double alpha; // { dg-error "" "" }
|
double alpha; // { dg-error "" "" }
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.