diff --git a/lang/occam/comp/occam.g b/lang/occam/comp/occam.g index 9af4a8c50..e314d3375 100644 --- a/lang/occam/comp/occam.g +++ b/lang/occam/comp/occam.g @@ -348,7 +348,7 @@ const_def { register char *name; struct expr *e; }: '=' expression(&e) { if (!constant(e) && !arr_constant(e)) nonconst("expression in constant definition"); - info.const=e; + info.t_const=e; insert(name, T_CONST|T_USED, 0, &info); } ; @@ -457,7 +457,7 @@ item(register struct expr **e;) var=searchall(token.t_sval); if (var_constant(var)) - *e=copy_const(var->s_info.const); + *e=copy_const(var->s_info.t_const); else { if (var_proc(var)) pars=var->s_info.proc.pars; diff --git a/lang/occam/comp/symtab.c b/lang/occam/comp/symtab.c index 991da805d..43f0591b6 100644 --- a/lang/occam/comp/symtab.c +++ b/lang/occam/comp/symtab.c @@ -121,7 +121,7 @@ static void sym_destroy(ps) register struct symbol *ps; } } else if ((ps->s_type&T_TYPE)==T_CONST) - destroy(ps->s_info.const); + destroy(ps->s_info.t_const); free(ps->s_name); free(ps); } diff --git a/lang/occam/comp/symtab.h b/lang/occam/comp/symtab.h index 1338b5dd7..45b03d2ee 100644 --- a/lang/occam/comp/symtab.h +++ b/lang/occam/comp/symtab.h @@ -54,7 +54,7 @@ union type_info { int offset; /* from its local level or builtin name */ } vc; /* Variable or channel */ - struct expr *const; + struct expr *t_const; struct { union storage st;