re PR c++/64251 (Chromium build error only with --enable-checking=yes)

PR c++/64251
	* decl2.c (mark_used): Don't mark if in_template_function.

From-SVN: r218876
This commit is contained in:
Jason Merrill 2014-12-18 17:22:36 -05:00 committed by Jason Merrill
parent 03b9b5ce20
commit 1b82e09e18
3 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2014-12-18 Jason Merrill <jason@redhat.com>
PR c++/64251
* decl2.c (mark_used): Don't mark if in_template_function.
2014-12-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/60955

View File

@ -5017,7 +5017,7 @@ mark_used (tree decl, tsubst_flags_t complain)
--function_depth;
}
if (processing_template_decl)
if (processing_template_decl || in_template_function ())
return true;
/* Check this too in case we're within instantiate_non_dependent_expr. */

View File

@ -0,0 +1,7 @@
// PR c++/64251
class DictionaryValue {};
template <typename T> void CreateValue(T) {
DictionaryValue(0);
CreateValue(0);
}