[Bug c++/86942] A trailing-return-type is allowed when the return type is not 'auto' for using declarations
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Aug 24 15:49:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86942
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Fri Aug 24 15:48:43 2018
New Revision: 263836
URL: https://gcc.gnu.org/viewcvs?rev=263836&root=gcc&view=rev
Log:
PR c++/67012
PR c++/86942
* decl.c (grokdeclarator): Disallow functions with trailing return
type with decltype(auto) as its type. Also check the function if
it's inner declarator doesn't exist
* g++.dg/cpp0x/auto52.C: New test.
* g++.dg/cpp1y/auto-fn52.C: New test.
* g++.dg/cpp1y/auto-fn53.C: New test.
* g++.dg/cpp1y/auto-fn54.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/auto52.C
trunk/gcc/testsuite/g++.dg/cpp1y/auto-fn52.C
trunk/gcc/testsuite/g++.dg/cpp1y/auto-fn53.C
trunk/gcc/testsuite/g++.dg/cpp1y/auto-fn54.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list