Debian Codegraph @

gcc/testsuite/g++.dg/parse/pr16696-permissive.C

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