From fa0bee0b26cef06468938d5e1bfb9fc557d67c8b Mon Sep 17 00:00:00 2001 From: ceriel Date: Tue, 17 Dec 1991 14:36:35 +0000 Subject: [PATCH] Do not use '#endif/#else xxx'; it is not allowed for ANSI C --- lang/m2/comp/Makefile | 2 +- lang/m2/comp/def.c | 2 +- lang/m2/comp/error.c | 6 +++--- lang/m2/comp/main.c | 2 +- lang/m2/comp/node.c | 2 +- lang/m2/comp/options.c | 2 +- lang/m2/comp/type.H | 8 ++++---- lang/m2/comp/walk.c | 6 +++--- lang/m2/m2mm/Makefile | 2 +- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lang/m2/comp/Makefile b/lang/m2/comp/Makefile index ba2909626..5df3de7f5 100644 --- a/lang/m2/comp/Makefile +++ b/lang/m2/comp/Makefile @@ -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 diff --git a/lang/m2/comp/def.c b/lang/m2/comp/def.c index d59bce123..ba3c6cb91 100644 --- a/lang/m2/comp/def.c +++ b/lang/m2/comp/def.c @@ -389,4 +389,4 @@ PrDef(df) { print("n: %s, k: %d\n", df->df_idf->id_text, df->df_kind); } -#endif DEBUG +#endif /* DEBUG */ diff --git a/lang/m2/comp/error.c b/lang/m2/comp/error.c index da84872b4..7367e0ae8 100644 --- a/lang/m2/comp/error.c +++ b/lang/m2/comp/error.c @@ -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; } diff --git a/lang/m2/comp/main.c b/lang/m2/comp/main.c index 8dcc884fc..20b8cb486 100644 --- a/lang/m2/comp/main.c +++ b/lang/m2/comp/main.c @@ -105,7 +105,7 @@ Compile(src, dst) LexScan(); return 1; } -#endif DEBUG +#endif /* DEBUG */ open_scope(OPENSCOPE); GlobalVis = CurrVis; close_scope(0); diff --git a/lang/m2/comp/node.c b/lang/m2/comp/node.c index 9da0f6d4f..ff2347740 100644 --- a/lang/m2/comp/node.c +++ b/lang/m2/comp/node.c @@ -155,4 +155,4 @@ PrNode(nd, lvl) break; } } -#endif DEBUG +#endif /* DEBUG */ diff --git a/lang/m2/comp/options.c b/lang/m2/comp/options.c index 01ae92904..370aa652e 100644 --- a/lang/m2/comp/options.c +++ b/lang/m2/comp/options.c @@ -229,7 +229,7 @@ DoOption(text) } } } -#endif NOCROSS +#endif /* NOCROSS */ break; } } diff --git a/lang/m2/comp/type.H b/lang/m2/comp/type.H index f1770384c..16eacd525 100644 --- a/lang/m2/comp/type.H +++ b/lang/m2/comp/type.H @@ -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) diff --git a/lang/m2/comp/walk.c b/lang/m2/comp/walk.c index 31f844e03..c013bf159 100644 --- a/lang/m2/comp/walk.c +++ b/lang/m2/comp/walk.c @@ -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. diff --git a/lang/m2/m2mm/Makefile b/lang/m2/m2mm/Makefile index d4a1643fd..faf53f693 100644 --- a/lang/m2/m2mm/Makefile +++ b/lang/m2/m2mm/Makefile @@ -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 -- 2.34.1