aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/semantics.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r--gcc/cp/semantics.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 6d7004b..183a78a 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -5187,14 +5187,10 @@ 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
- instantiation time, so defer the decltype as well (PR 42277). */
- || (id_expression_or_member_access_p
- && processing_template_decl
- && TREE_CODE (expr) == COMPONENT_REF))
+ /* Depending on the resolution of DR 1172, we may later need to distinguish
+ instantiation-dependent but not type-dependent expressions so that, say,
+ A<decltype(sizeof(T))>::U doesn't require 'typename'. */
+ if (instantiation_dependent_expression_p (expr))
{
type = cxx_make_type (DECLTYPE_TYPE);
DECLTYPE_TYPE_EXPR (type) = expr;