User account creation filtered due to spam.

Bug 46245 - [C++0x] rejects function with late-specified return type as a non-type template parameter
Summary: [C++0x] rejects function with late-specified return type as a non-type templa...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: 4.6.1
Assignee: Jason Merrill
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-30 15:55 UTC by Johannes Schaub
Modified: 2011-05-26 13:45 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2011-05-25 16:49:12


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Schaub 2010-10-30 15:55:43 UTC
GCC rejects the following:

template<auto f()->int> struct A { };

"error: parameter declared 'auto'"
Comment 1 Jason Merrill 2011-05-25 19:51:56 UTC
Author: jason
Date: Wed May 25 19:51:54 2011
New Revision: 174227

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174227
Log:
	PR c++/46245
	* decl.c (grokdeclarator): Complain later for auto parameter.
	* pt.c (splice_late_return_type): Handle use in a template
	type-parameter.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/auto23.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl.c
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/cpp0x/auto9.C
Comment 2 Jason Merrill 2011-05-25 20:29:56 UTC
Author: jason
Date: Wed May 25 20:29:54 2011
New Revision: 174234

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174234
Log:
	PR c++/46245
	* decl.c (grokdeclarator): Complain later for auto parameter.
	* pt.c (splice_late_return_type): Handle use in a template
	type-parameter.

Added:
    branches/gcc-4_6-branch/gcc/testsuite/g++.dg/cpp0x/auto23.C
Modified:
    branches/gcc-4_6-branch/gcc/cp/ChangeLog
    branches/gcc-4_6-branch/gcc/cp/decl.c
    branches/gcc-4_6-branch/gcc/cp/pt.c
    branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_6-branch/gcc/testsuite/g++.dg/cpp0x/auto9.C
Comment 3 Jason Merrill 2011-05-26 13:45:15 UTC
Fixed for 4.6.1.