blob: 902e2a1a90b5a9404db2438fa19044345e9c520a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// PR 16696 Strange message when operator++ not found
// { dg-do compile }
// { dg-options "-fdiagnostics-show-option" }
struct X { void operator++(); };
struct Y { };
int main () {
X x;
Y y;
x++; // { dg-bogus "trying prefix operator" }
// { dg-error "fpermissive" "" { target *-*-* } 12 }
y++; // { dg-bogus "trying prefix operator" }
// { dg-error "fpermissive" "" { target *-*-* } 14 }
}
|