summaryrefslogtreecommitdiff
path: root/gcc/cp/lex.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/lex.c')
-rw-r--r--gcc/cp/lex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index 5ecb03ef9b2..816f9e38c77 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -792,7 +792,7 @@ do_identifier (token, args)
{
/* Check access. */
if (IDENTIFIER_CLASS_VALUE (token) == id)
- enforce_access (CP_DECL_CONTEXT(id), id);
+ perform_or_defer_access_check (CP_DECL_CONTEXT(id), id);
if (!processing_template_decl || DECL_TEMPLATE_PARM_P (id))
id = DECL_INITIAL (id);
}