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:
parent
03b9b5ce20
commit
1b82e09e18
@ -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
|
||||
|
@ -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. */
|
||||
|
7
gcc/testsuite/g++.dg/template/non-dependent14.C
Normal file
7
gcc/testsuite/g++.dg/template/non-dependent14.C
Normal file
@ -0,0 +1,7 @@
|
||||
// PR c++/64251
|
||||
|
||||
class DictionaryValue {};
|
||||
template <typename T> void CreateValue(T) {
|
||||
DictionaryValue(0);
|
||||
CreateValue(0);
|
||||
}
|
Loading…
Reference in New Issue
Block a user