extern char options[];
int fp_used;
+STATIC char *
+NameOfProc(df)
+ register struct def *df;
+{
+
+ assert(df->df_kind & (D_PROCHEAD|D_PROCEDURE));
+
+ if (df->df_kind == D_PROCEDURE) {
+ return df->prc_vis->sc_scope->sc_name;
+ }
+ return df->for_name;
+}
+
CodeConst(cst, size)
arith cst;
int size;
and result is already done.
*/
register struct node *left = nd->nd_left;
- register struct def *df;
register struct node *right = nd->nd_right;
register struct type *result_tp;
switch(left->nd_class) {
case Def: {
- df = left->nd_def;
-
- if (df->df_kind == D_PROCEDURE) {
- int level = df->df_scope->sc_level;
+ if (left->nd_def->df_kind & (D_PROCEDURE|D_PROCHEAD)) {
+ int level = left->nd_def->df_scope->sc_level;
if (level > 0) {
C_lxl((arith) (proclevel - level));
}
- C_cal(NameOfProc(df));
- break;
- }
- else if (df->df_kind == D_PROCHEAD) {
- C_cal(df->for_name);
+ C_cal(NameOfProc(left->nd_def));
break;
}}
/* Fall through */
struct node *pr_body; /* body of this procedure */
#define prc_vis df_value.df_proc.pr_vis
#define prc_body df_value.df_proc.pr_body
-#define NameOfProc(xdf) ((xdf)->prc_vis->sc_scope->sc_name)
};
struct import {
}
tp->tp_next = base;
- tp->tp_size = base->tp_size;
- tp->tp_align = base->tp_align;
}
int
res = construct_type(T_SUBRANGE, tp);
res->sub_lb = lb->nd_INT;
res->sub_ub = ub->nd_INT;
- res->tp_size = tp->tp_size;
- res->tp_align = tp->tp_align;
if (tp == card_type) {
u_small(res, res->sub_ub);
}