aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r--gcc/cp/error.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index f585d5f..dd3a339 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -4276,7 +4276,7 @@ qualified_name_lookup_error (tree scope, tree name,
else
{
name_hint hint;
- if (SCOPED_ENUM_P (scope))
+ if (SCOPED_ENUM_P (scope) && TREE_CODE (name) == IDENTIFIER_NODE)
hint = suggest_alternative_in_scoped_enum (name, scope);
if (const char *suggestion = hint.suggestion ())
{