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: r52896
This commit is contained in:
parent
3939c11f5c
commit
cd24738009
|
@ -1,3 +1,9 @@
|
|||
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
|
||||
|
|
|
@ -5337,6 +5337,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)))
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
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
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
// PR c++/6477
|
||||
typedef struct A_ *A; // { dg-error "previous declaration as" }
|
||||
typedef struct A B; // { dg-error "conflicting types" }
|
Loading…
Reference in New Issue