aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/semantics.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-02-23 23:56:26 -0500
committerJason Merrill <jason@gcc.gnu.org>2011-02-23 23:56:26 -0500
commit67e18edbc6fcddeb11629224e53629bdb59c7ed1 (patch)
treed6fdd251fa53f073e7a55645ed002529e562a279 /gcc/cp/semantics.c
parent5a30f819c7f84dcee4987b96d7e9d8ea0177fe90 (diff)
downloadgcc-67e18edbc6fcddeb11629224e53629bdb59c7ed1.zip
gcc-67e18edbc6fcddeb11629224e53629bdb59c7ed1.tar.gz
gcc-67e18edbc6fcddeb11629224e53629bdb59c7ed1.tar.bz2
cp-tree.h (DECL_PARM_LEVEL): New.
* cp-tree.h (DECL_PARM_LEVEL): New. (struct lang_decl_parm): Add level field. * name-lookup.c (function_parm_depth): New fn. * name-lookup.h: Declare it. * parser.c (cp_parser_parameter_declaration_list): Use it. * mangle.c (struct globals): Add parm_depth field. (write_bare_function_type): Adjust it. (write_expression): Include the level delta in PARM_DECL mangling for abi >= 6. * semantics.c (finish_decltype_type): Remove shortcut for decltype of id-expression. * mangle.c (write_type) [DECLTYPE_TYPE]: Strip it here for abi < 6. From-SVN: r170459
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r--gcc/cp/semantics.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 4af007d..8a7dd7d 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -4772,6 +4772,7 @@ finish_decltype_type (tree expr, bool id_expression_or_member_access_p)
return error_mark_node;
}
+ /* FIXME instantiation-dependent */
if (type_dependent_expression_p (expr)
/* In a template, a COMPONENT_REF has an IDENTIFIER_NODE for op1 even
if it isn't dependent, so that we can check access control at
@@ -4780,27 +4781,6 @@ finish_decltype_type (tree expr, bool id_expression_or_member_access_p)
&& processing_template_decl
&& TREE_CODE (expr) == COMPONENT_REF))
{
- if (id_expression_or_member_access_p)
- {
- switch (TREE_CODE (expr))
- {
- case VAR_DECL:
- case PARM_DECL:
- case RESULT_DECL:
- case FUNCTION_DECL:
- case CONST_DECL:
- case TEMPLATE_PARM_INDEX:
- type = TREE_TYPE (expr);
- break;
-
- default:
- break;
- }
- }
-
- if (type && !type_uses_auto (type))
- return type;
-
treat_as_dependent:
type = cxx_make_type (DECLTYPE_TYPE);
DECLTYPE_TYPE_EXPR (type) = expr;