re PR c++/67012 (decltype(auto) with trailing return type)
authorMarek Polacek <polacek@redhat.com>
Fri, 24 Aug 2018 15:48:43 +0000 (15:48 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Fri, 24 Aug 2018 15:48:43 +0000 (15:48 +0000)
commit13ff3e166de379e0386bfaeadf3ae5fba56a0ef5
treeaad412b6ba7bdb890f4d5e7a8ae9bedb29a470db
parenteafa30efd073d937054788c0915957508c85ac8b
re PR c++/67012 (decltype(auto) with trailing return type)

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.

From-SVN: r263836
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/auto52.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/auto-fn52.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/auto-fn53.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/auto-fn54.C [new file with mode: 0644]