mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-24 21:01:27 +08:00
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:
parent
6f13089ed5
commit
c97c25c0b9
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
7
gcc/testsuite/g++.dg/cpp0x/decltype24.C
Normal file
7
gcc/testsuite/g++.dg/cpp0x/decltype24.C
Normal 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;
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user