Commit 279d3eb8 by Paolo Carlini Committed by Paolo Carlini

re PR c++/60384 ([c++1y] ICE with invalid typedef)

/cp
2014-03-21  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/60384
	* name-lookup.c (push_class_level_binding_1): Check identifier_p
	on the name argument.

/testsuite
2014-03-21  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/60384
	* g++.dg/cpp1y/pr60384.C: New.

From-SVN: r208752
parent 44eb6c40
2014-03-21 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/60384
* name-lookup.c (push_class_level_binding_1): Check identifier_p
on the name argument.
2014-03-20 Jakub Jelinek <jakub@redhat.com> 2014-03-20 Jakub Jelinek <jakub@redhat.com>
PR c++/60572 PR c++/60572
......
...@@ -3115,6 +3115,13 @@ push_class_level_binding_1 (tree name, tree x) ...@@ -3115,6 +3115,13 @@ push_class_level_binding_1 (tree name, tree x)
if (name == error_mark_node) if (name == error_mark_node)
return false; return false;
/* Can happen for an erroneous declaration (c++/60384). */
if (!identifier_p (name))
{
gcc_assert (errorcount || sorrycount);
return false;
}
/* Check for invalid member names. But don't worry about a default /* Check for invalid member names. But don't worry about a default
argument-scope lambda being pushed after the class is complete. */ argument-scope lambda being pushed after the class is complete. */
gcc_assert (TYPE_BEING_DEFINED (current_class_type) gcc_assert (TYPE_BEING_DEFINED (current_class_type)
......
2014-03-21 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/60384
* g++.dg/cpp1y/pr60384.C: New.
2014-03-21 Jakub Jelinek <jakub@redhat.com> 2014-03-21 Jakub Jelinek <jakub@redhat.com>
PR target/60598 PR target/60598
......
// PR c++/60384
// { dg-do compile { target c++1y } }
template<typename> int foo();
struct A
{
typedef auto foo<>(); // { dg-error "typedef declared 'auto'" }
};
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