diff options
author | Jason Merrill <jason@redhat.com> | 2012-07-18 21:36:58 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2012-07-18 21:36:58 -0400 |
commit | fa4a66d152dad4a1f08bc6119cba3c6922310dce (patch) | |
tree | 74614514f7139c57ecf605d372a64a51504c23eb /gcc/cp | |
parent | 0e69fdf016311cb8570c43d8ec67e9d5cb2f2aeb (diff) | |
download | gcc-fa4a66d152dad4a1f08bc6119cba3c6922310dce.zip gcc-fa4a66d152dad4a1f08bc6119cba3c6922310dce.tar.gz gcc-fa4a66d152dad4a1f08bc6119cba3c6922310dce.tar.bz2 |
* pt.c (instantiate_decl): Don't recheck substitutions.
From-SVN: r189640
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/pt.c | 29 |
2 files changed, 4 insertions, 29 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5cc6ccd..9a3c656 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2012-07-18 Jason Merrill <jason@redhat.com> + + * pt.c (instantiate_decl): Don't recheck substitutions. + 2012-07-18 Paolo Carlini <paolo.carlini@oracle.com> Jason Merrill <jason@redhat.com> diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 65eb2cc..0d25398 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -18248,35 +18248,6 @@ instantiate_decl (tree d, int defer_ok, if (TREE_CODE (d) == FUNCTION_DECL) maybe_instantiate_noexcept (d); - /* Recheck the substitutions to obtain any warning messages - about ignoring cv qualifiers. Don't do this for artificial decls, - as it breaks the context-sensitive substitution for lambda op(). */ - if (!defer_ok && !DECL_ARTIFICIAL (d)) - { - tree gen = DECL_TEMPLATE_RESULT (gen_tmpl); - tree type = TREE_TYPE (gen); - - /* Make sure that we can see identifiers, and compute access - correctly. D is already the target FUNCTION_DECL with the - right context. */ - push_access_scope (d); - - if (TREE_CODE (gen) == FUNCTION_DECL) - { - tsubst (DECL_ARGUMENTS (gen), gen_args, tf_warning_or_error, d); - tsubst_exception_specification (type, gen_args, tf_warning_or_error, - d, /*defer_ok*/true); - /* Don't simply tsubst the function type, as that will give - duplicate warnings about poor parameter qualifications. - The function arguments are the same as the decl_arguments - without the top level cv qualifiers. */ - type = TREE_TYPE (type); - } - tsubst (type, gen_args, tf_warning_or_error, d); - - pop_access_scope (d); - } - /* Defer all other templates, unless we have been explicitly forbidden from doing so. */ if (/* If there is no definition, we cannot instantiate the |