From d55d4bb69f2b56f15b9f2e365cf88ad3fad10b6d Mon Sep 17 00:00:00 2001 From: ceriel Date: Thu, 19 Jan 1989 10:58:43 +0000 Subject: [PATCH] fixed another POINTER TO IDENT problem --- lang/m2/comp/Version.c | 2 +- lang/m2/comp/type.c | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lang/m2/comp/Version.c b/lang/m2/comp/Version.c index 1c0dcdce7..a8b24e900 100644 --- a/lang/m2/comp/Version.c +++ b/lang/m2/comp/Version.c @@ -1 +1 @@ -static char Version[] = "ACK Modula-2 compiler Version 0.44"; +static char Version[] = "ACK Modula-2 compiler Version 0.45"; diff --git a/lang/m2/comp/type.c b/lang/m2/comp/type.c index 43708365c..8db3e4433 100644 --- a/lang/m2/comp/type.c +++ b/lang/m2/comp/type.c @@ -727,12 +727,20 @@ type_or_forward(ptp) /* Either a Module or a Type, but in both cases defined in this scope, so this is the correct identification */ - if (df1->df_kind == D_FORWTYPE) { + switch(df1->df_kind) { + case D_FORWARD: + FreeNode(df1->for_node); + df1->df_kind = D_FORWTYPE; + df1->df_forw_node = 0; + /* Fall through */ + case D_FORWTYPE: nd = dot2node(0, NULLNODE, df1->df_forw_node); df1->df_forw_node = nd; nd->nd_type = *ptp; + return 0; + default: + return 1; } - return 1; } nd = dot2leaf(0); if ((df1 = lookfor(nd, CurrVis, 0, D_USED))->df_kind == D_MODULE) { -- 2.34.1