PR c++/89390
* error.c (qualified_name_lookup_error): Only call
suggest_alternative_in_scoped_enum if name is IDENTIFIER_NODE.
* g++.dg/diagnostic/pr89390.C: New test.
From-SVN: r269007
+2019-02-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/89390
+ * error.c (qualified_name_lookup_error): Only call
+ suggest_alternative_in_scoped_enum if name is IDENTIFIER_NODE.
+
2019-02-19 Tom Honermann <tom@honermann.net>
* name-lookup.c (get_std_name_hint): Added u8string as a name hint.
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 ())
{
+2019-02-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/89390
+ * g++.dg/diagnostic/pr89390.C: New test.
+
2019-02-18 Sharon Dvir <unapologtic@gmail.com>
* README: Fix typos.
--- /dev/null
+// PR c++/89390
+// { dg-do compile { target c++11 } }
+
+enum class A { B, C };
+
+void
+foo ()
+{
+ A::~A (); // { dg-error "'~A' is not a member of 'A'" "" { target *-*-* } 0 }
+}