Mercurial > hg > CbC > CbC_gcc
diff gcc/testsuite/g++.old-deja/g++.jason/operator.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
line wrap: on
line diff
--- a/gcc/testsuite/g++.old-deja/g++.jason/operator.C Fri Oct 27 22:46:09 2017 +0900 +++ b/gcc/testsuite/g++.old-deja/g++.jason/operator.C Thu Oct 25 07:37:49 2018 +0900 @@ -6,27 +6,27 @@ struct A { int operator?:(int a, int b); // { dg-error "expected type-specifier" } - static int operator()(int a); // { dg-error "must be a nonstatic member" } - static int operator+(A,A); // { dg-error "either a non-static member" } - int operator+(int a, int b = 1); // { dg-error "either zero or one" } - int operator++(char); // { dg-error "must take 'int'" } + static int operator()(int a); // { dg-error "14:.static int A::operator\\(\\)\\(int\\). must be a nonstatic member function" } + static int operator+(A,A); // { dg-error "14:.static int A::operator\\+\\(A, A\\). must be either a non-static member function or a non-member function" } + int operator+(int a, int b = 1); // { dg-error "7:.int A::operator\\+\\(int, int\\). must have either zero or one argument" } + int operator++(char); // { dg-error "7:postfix .int A::operator\\+\\+\\(char\\). must have .int. as its argument" } void operator delete (void *); void operator delete (void *, unsigned long); }; struct B { void * operator new (size_t, void *); - int operator++(int = 0); + int operator++(int = 0); // { dg-error "7:.int B::operator\\+\\+\\(int\\). cannot have default arguments" } int operator+ (int); void operator()(); char * operator[](int); B * operator->(); }; -int operator-(int a, int b); // { dg-error "argument of class or" } +int operator-(int a, int b); // { dg-error "5:.int operator-\\(int, int\\). must have an argument of class or enumerated type" } -void * operator new (A a); // { dg-error "first parameter" } -void operator delete (A a); // { dg-error "first parameter" } +void * operator new (A a); // { dg-error ".operator new. takes type .size_t." } +void operator delete (A a); // { dg-error ".operator delete. takes type .void\\*. as first parameter" } char * operator char * (int); // { dg-error "return type" "ret" } -// { dg-error "nonstatic member function" "mem" { target *-*-* } .-1 } +// { dg-error "8:.operator char\\*\\*\\(int\\). must be a nonstatic member function" "mem" { target *-*-* } .-1 }