comparison gcc/testsuite/g++.old-deja/g++.law/ctors5.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
14 X( int ); 14 X( int );
15 }; 15 };
16 16
17 class Y // { dg-error "1:new types may not be defined in a return type" "err" } 17 class Y // { dg-error "1:new types may not be defined in a return type" "err" }
18 // { dg-message "1:\\(perhaps a semicolon is missing after the definition of 'Y'\\)" "note" { target *-*-* } .-1 } 18 // { dg-message "1:\\(perhaps a semicolon is missing after the definition of 'Y'\\)" "note" { target *-*-* } .-1 }
19 // { dg-error "1:return type specification for constructor invalid" "err" { target *-*-* } .-2 }
19 { 20 {
20 private: 21 private:
21 X xx; 22 X xx;
22 public: 23 public:
23 Y(); 24 Y();
24 } 25 }
25 X::X( int xi ) // { dg-error "14:return type specification for constructor invalid" "err" } 26 X::X( int xi )
26 // { dg-message "1:X::X|candidate expects" "match candidate text" { target *-*-* } .-1 } 27 // { dg-message "1:X::X|candidate expects" "match candidate text" { target *-*-* } .-1 }
27 { 28 {
28 x = xi; 29 x = xi;
29 } 30 }
30 31