summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2009-09-02 11:48:52 -0400
committerJason Merrill <jason@gcc.gnu.org>2009-09-02 11:48:52 -0400
commitaef8bce8f861da1d9c2e2d10c6a9a30f3f630e95 (patch)
tree851c3aa7b314e91d451f5fce0f6b5cee9ae65c37 /gcc/cp
parent301ea0943188c469a2c9b567dedb0f7f64d7d826 (diff)
downloadgcc-aef8bce8f861da1d9c2e2d10c6a9a30f3f630e95.tar.gz
* semantics.c (describable_type): Don't pretend to be in a template.
From-SVN: r151335
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/semantics.c6
2 files changed, 4 insertions, 6 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index d4745c370c6..0a351b2068d 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,4 +1,6 @@
-2009-09-01 Jason Merrill <jason@redhat.com>
+2009-09-02 Jason Merrill <jason@redhat.com>
+
+ * semantics.c (describable_type): Don't pretend to be in a template.
* ptree.c (cxx_print_type) [DECLTYPE_TYPE]: Print the expression.
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 1c16b72e8d5..1e5255e8ce2 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -4543,17 +4543,13 @@ describable_type (tree expr)
{
tree type = NULL_TREE;
- /* processing_template_decl isn't set when we're called from the mangling
- code, so bump it now. */
- ++processing_template_decl;
if (! type_dependent_expression_p (expr)
&& ! type_unknown_p (expr))
{
- type = TREE_TYPE (expr);
+ type = unlowered_expr_type (expr);
if (real_lvalue_p (expr))
type = build_reference_type (type);
}
- --processing_template_decl;
if (type)
return type;