Commit 883c0796 by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/89390 (ICE in get_string, at spellcheck-tree.h:46)

	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
parent 102a4fe1
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.
......
......@@ -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 ())
{
......
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.
......
// 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 }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment