mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-22 22:01:20 +08:00
re PR c++/53624 (GCC rejects function local types in template function with default template arguments)
/cp 2012-07-31 Paolo Carlini <paolo.carlini@oracle.com> PR c++/53624 * pt.c (check_default_tmpl_args): Don't check local types. /testsuite 2012-07-31 Paolo Carlini <paolo.carlini@oracle.com> PR c++/53624 * g++.dg/cpp0x/temp_default5.C: New. From-SVN: r190001
This commit is contained in:
parent
3ad45f7ff3
commit
8dca7e9303
@ -1,8 +1,12 @@
|
||||
2012-07-31 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/53624
|
||||
* pt.c (check_default_tmpl_args): Don't check local types.
|
||||
|
||||
2012-07-25 Sandra Loosemore <sandra@codesourcery.com>
|
||||
Paul Brook <paul@codesourcery.com>
|
||||
|
||||
PR target/53633
|
||||
|
||||
* decl.c (finish_function): Check targetm.warn_func_return.
|
||||
|
||||
2012-07-25 Jason Merrill <jason@redhat.com>
|
||||
|
@ -4267,7 +4267,8 @@ check_default_tmpl_args (tree decl, tree parms, int is_primary,
|
||||
|
||||
/* Core issue 226 (C++0x only): the following only applies to class
|
||||
templates. */
|
||||
if ((cxx_dialect == cxx98) || TREE_CODE (decl) != FUNCTION_DECL)
|
||||
if (is_primary
|
||||
&& ((cxx_dialect == cxx98) || TREE_CODE (decl) != FUNCTION_DECL))
|
||||
{
|
||||
/* [temp.param]
|
||||
|
||||
@ -4299,8 +4300,7 @@ check_default_tmpl_args (tree decl, tree parms, int is_primary,
|
||||
TREE_PURPOSE (parm) = error_mark_node;
|
||||
no_errors = false;
|
||||
}
|
||||
else if (is_primary
|
||||
&& !is_partial
|
||||
else if (!is_partial
|
||||
&& !is_friend_decl
|
||||
/* Don't complain about an enclosing partial
|
||||
specialization. */
|
||||
|
@ -1,3 +1,8 @@
|
||||
2012-07-31 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/53624
|
||||
* g++.dg/cpp0x/temp_default5.C: New.
|
||||
|
||||
2012-07-30 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
PR fortran/51081
|
||||
|
13
gcc/testsuite/g++.dg/cpp0x/temp_default5.C
Normal file
13
gcc/testsuite/g++.dg/cpp0x/temp_default5.C
Normal file
@ -0,0 +1,13 @@
|
||||
// { dg-options "-std=c++11" }
|
||||
|
||||
template <class Z = void, class T>
|
||||
void Foo(T)
|
||||
{
|
||||
struct X {};
|
||||
}
|
||||
|
||||
template <class T = int, typename U>
|
||||
void f(const U&)
|
||||
{
|
||||
auto g = [] () {};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user