summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/parse/pr16696-permissive.C
blob: 1d8a920ad25e544f41c766d4da7e01878e7af1c8 (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 -fpermissive" } 


struct X { void operator++(); }; 
struct Y { };

int main () { 
  X x; 
  Y y;
  x++; // { dg-warning "trying prefix operator" } 

  y++; // { dg-warning "trying prefix operator" } 
  // { dg-error "no match" "" { target *-*-* } 14 }
}