Do not use '#endif/#else xxx'; it is not allowed for ANSI C

This commit is contained in:
ceriel 1991-12-17 14:36:35 +00:00
parent 8482d2c110
commit fa0bee0b26
9 changed files with 16 additions and 16 deletions

View file

@ -2,4 +2,4 @@ distr:
echo '#ifndef lint' > Version.c
echo 'char Version[] = "ACK Modula-2 compiler Version XXX";' | \
sed "s/XXX/`RC -i`/" >> Version.c
echo '#endif lint' >> Version.c
echo '#endif' >> Version.c

View file

@ -389,4 +389,4 @@ PrDef(df)
{
print("n: %s, k: %d\n", df->df_idf->id_text, df->df_kind);
}
#endif DEBUG
#endif /* DEBUG */

View file

@ -72,7 +72,7 @@ debug(va_alist)
}
va_end(ap);
}
#endif DEBUG
#endif /* DEBUG */
/*VARARGS*/
error(va_alist)
@ -253,7 +253,7 @@ _error(class, node, ap)
case VDEBUG:
remark = "(debug)";
break;
#endif DEBUG
#endif /* DEBUG */
}
/* the place */
@ -268,7 +268,7 @@ _error(class, node, ap)
case FATAL:
#ifdef DEBUG
case VDEBUG:
#endif DEBUG
#endif /* DEBUG */
ln = LineNumber;
break;
}

View file

@ -105,7 +105,7 @@ Compile(src, dst)
LexScan();
return 1;
}
#endif DEBUG
#endif /* DEBUG */
open_scope(OPENSCOPE);
GlobalVis = CurrVis;
close_scope(0);

View file

@ -155,4 +155,4 @@ PrNode(nd, lvl)
break;
}
}
#endif DEBUG
#endif /* DEBUG */

View file

@ -229,7 +229,7 @@ DoOption(text)
}
}
}
#endif NOCROSS
#endif /* NOCROSS */
break;
}
}

View file

@ -163,7 +163,7 @@ extern t_type
#define pointer_size (SZ_POINTER)
#define wrd_bits (8*(int)word_size)
#else NOCROSS
#else /* NOCROSS */
extern int
word_align,
@ -187,7 +187,7 @@ extern arith
extern unsigned int
wrd_bits; /* from cstoper.c */
#endif NOCROSS
#endif /* NOCROSS */
extern arith
ret_area_size;
@ -225,14 +225,14 @@ extern t_type
(tpx)->tp_next)
#define SubBaseType(tpx) (assert((tpx)->tp_fund == T_SUBRANGE), \
(tpx)->tp_next)
#else DEBUG
#else /* DEBUG */
#define ResultType(tpx) ((tpx)->tp_next)
#define ParamList(tpx) ((tpx)->prc_params)
#define IndexType(tpx) ((tpx)->tp_next)
#define ElementType(tpx) ((tpx)->tp_next)
#define PointedtoType(tpx) ((tpx)->tp_next)
#define SubBaseType(tpx) ((tpx)->tp_next)
#endif DEBUG
#endif /* DEBUG */
#define BaseType(tpx) ((tpx)->tp_fund == T_SUBRANGE ? (tpx)->tp_next : \
(tpx))
#define IsConstructed(tpx) ((tpx)->tp_fund & T_CONSTRUCTED)

View file

@ -304,7 +304,7 @@ WalkProcedure(procedure)
too_big = ++data_label;
C_df_dlb(too_big);
C_bss_cst(func_res_size, (arith)0, 0);
#endif BIG_RESULT_ON_STACK
#endif /* BIG_RESULT_ON_STACK */
}
}
@ -441,7 +441,7 @@ WalkProcedure(procedure)
C_lal(procedure->df_type->prc_nbpar);
#else
c_lae_dlb(too_big);
#endif BIG_RESULT_ON_STACK
#endif /* BIG_RESULT_ON_STACK */
C_sti(func_res_size);
if (StackAdjustment) {
/* Remove copies of conformant arrays
@ -454,7 +454,7 @@ WalkProcedure(procedure)
#else
c_lae_dlb(too_big);
func_res_size = pointer_size;
#endif BIG_RESULT_ON_STACK
#endif /* BIG_RESULT_ON_STACK */
}
else if (StackAdjustment) {
/* First save the function result in a safe place.

View file

@ -2,4 +2,4 @@ distr:
echo '#ifndef lint' > Version.c
echo 'char Version[] = "ACK Modula-2 Makefile generator Version XXX";' | \
sed "s/XXX/`RC -i`/" >> Version.c
echo '#endif lint' >> Version.c
echo '#endif' >> Version.c