re PR c++/47068 ([C++0x] internal compiler error on decltype(~ expression))

PR c++/47068
	* semantics.c (finish_id_expression): Don't note non-names
	as being used in the class.

From-SVN: r168309
This commit is contained in:
Jason Merrill 2010-12-28 21:17:47 -05:00 committed by Jason Merrill
parent 6f13089ed5
commit c97c25c0b9
4 changed files with 20 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2010-12-28 Jason Merrill <jason@redhat.com>
PR c++/47068
* semantics.c (finish_id_expression): Don't note non-names
as being used in the class.
2010-12-23 Jason Merrill <jason@redhat.com>
* parser.c (cp_parser_unary_expression): Remove redundant C++0x

View File

@ -2797,7 +2797,8 @@ finish_id_expression (tree id_expression,
the current class so that we can check later to see if
the meaning would have been different after the class
was entirely defined. */
if (!scope && decl != error_mark_node)
if (!scope && decl != error_mark_node
&& TREE_CODE (id_expression) == IDENTIFIER_NODE)
maybe_note_name_used_in_class (id_expression, decl);
/* Disallow uses of local variables from containing functions, except

View File

@ -1,3 +1,8 @@
2010-12-28 Jason Merrill <jason@redhat.com>
PR c++/47068
* g++.dg/cpp0x/decltype24.C: New.
2010-12-28 Nicola Pero <nicola.pero@meta-innovation.com>
PR objc/47076

View File

@ -0,0 +1,7 @@
// PR c++/47068
// { dg-options -std=c++0x }
template <class T> struct broken {
int member;
typedef decltype(~ member) gcc_crashes_here;
};