URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 301 |
Rev 384 |
// PR 16696 Strange message when operator++ not found
|
// PR 16696 Strange message when operator++ not found
|
// { dg-do compile }
|
// { dg-do compile }
|
// { dg-options "-fdiagnostics-show-option" }
|
// { dg-options "-fdiagnostics-show-option" }
|
|
|
|
|
struct X { void operator++(); };
|
struct X { void operator++(); };
|
struct Y { };
|
struct Y { };
|
|
|
int main () {
|
int main () {
|
X x;
|
X x;
|
Y y;
|
Y y;
|
x++; // { dg-bogus "trying prefix operator" }
|
x++; // { dg-bogus "trying prefix operator" }
|
// { dg-error "fpermissive" "" { target *-*-* } 12 }
|
// { dg-error "fpermissive" "" { target *-*-* } 12 }
|
y++; // { dg-bogus "trying prefix operator" }
|
y++; // { dg-bogus "trying prefix operator" }
|
// { dg-error "fpermissive" "" { target *-*-* } 14 }
|
// { dg-error "fpermissive" "" { target *-*-* } 14 }
|
}
|
}
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.