On Thu, Nov 10, 2016 at 10:50:27PM +0100, Jakub Jelinek wrote: > > + self(); // error: use of 'decltype(auto) > > fix_type<Functor>::operator()() [with Functor = main()::<lambda(auto:1&)>]' > > before deduction of 'auto' > > Wouldn't it be clearer to turn that // error: line into > // { dg-bogus "use of \[^\n\r]* before deduction of 'auto'" } > so that it is clear that the error is undesirable even to casual reader?
Now in the form of patch. Tested on x86_64-linux, ok for trunk? 2016-11-15 Jakub Jelinek <ja...@redhat.com> * g++.dg/cpp1y/auto-fn33.C (main): Turn // error: ... into dg-bogus. --- gcc/testsuite/g++.dg/cpp1y/auto-fn33.C.jj 2016-11-11 12:45:40.000000000 +0100 +++ gcc/testsuite/g++.dg/cpp1y/auto-fn33.C 2016-11-15 15:36:58.538054171 +0100 @@ -20,7 +20,7 @@ int main() { return 0; - self(); // error: use of 'decltype(auto) fix_type<Functor>::operator()() [with Functor = main()::<lambda(auto:1&)>]' before deduction of 'auto' + self(); // { dg-bogus "use of \[^\n\r]* before deduction of 'auto'" } }); return zero(); Jakub