Commit 3a73bffb by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/6477 (Segfault on conflicting types in trivial code)

	PR c++/6477
	* decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
	non-NULL first.

	* g++.dg/parse/typedef1.C: New test.

From-SVN: r52900
parent 44aefada
2002-04-29 Jakub Jelinek <jakub@redhat.com>
PR c++/6477
* decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
non-NULL first.
2002-04-29 Mark Mitchell <mark@codesourcery.com>
PR c++/6492
......
......@@ -5332,6 +5332,8 @@ follow_tag_typedef (type)
tree original;
original = original_type (type);
if (! TYPE_NAME (original))
return NULL_TREE;
if (TYPE_IDENTIFIER (original) == TYPE_IDENTIFIER (type)
&& (CP_DECL_CONTEXT (TYPE_NAME (original))
== CP_DECL_CONTEXT (TYPE_NAME (type)))
......
2002-04-29 Jakub Jelinek <jakub@redhat.com>
* g++.dg/parse/typedef1.C: New test.
2002-04-29 Mark Mitchell <mark@codesourcery.com>
PR c++/6486
......
// PR c++/6477
typedef struct A_ *A; // { dg-error "previous declaration as" }
typedef struct A B; // { dg-error "conflicting types" }
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