Skip to content

Commit

Permalink
Issue 4543 - Regression(1.054, 2.038) typedef causes circular definit…
Browse files Browse the repository at this point in the history
…ion and segfault - fix the segfault
  • Loading branch information
Iain Buclaw authored and WalterBright committed Apr 19, 2011
1 parent 0993089 commit 0c68e90
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/attrib.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,12 @@ void AnonDeclaration::semantic(Scope *sc)
{
//printf("\tAnonDeclaration::semantic %s %p\n", isunion ? "union" : "struct", this);

if (sem == 1)
{ //printf("already completed\n");
scope = NULL;
return; // semantic() already completed
}

Scope *scx = NULL;
if (scope)
{ sc = scope;
Expand Down

0 comments on commit 0c68e90

Please sign in to comment.