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

This commit is contained in:
ceriel 1991-12-17 14:11:15 +00:00
parent a38be6605e
commit 929a0025ca
56 changed files with 343 additions and 345 deletions

View file

@ -13,8 +13,6 @@ asm.c
assert.h assert.h
atw.h atw.h
blocks.c blocks.c
cem.1
cem.c
cemcom.1 cemcom.1
ch7.c ch7.c
ch7bin.c ch7bin.c

View file

@ -56,7 +56,7 @@
#ifndef NOFLOAT #ifndef NOFLOAT
#define SZ_FLOAT (arith)4 #define SZ_FLOAT (arith)4
#define SZ_DOUBLE (arith)8 #define SZ_DOUBLE (arith)8
#endif NOFLOAT #endif /* NOFLOAT */
#define SZ_POINTER (arith)4 #define SZ_POINTER (arith)4
/* target machine alignment requirements */ /* target machine alignment requirements */
@ -68,7 +68,7 @@
#ifndef NOFLOAT #ifndef NOFLOAT
#define AL_FLOAT SZ_WORD #define AL_FLOAT SZ_WORD
#define AL_DOUBLE SZ_WORD #define AL_DOUBLE SZ_WORD
#endif NOFLOAT #endif /* NOFLOAT */
#define AL_POINTER SZ_WORD #define AL_POINTER SZ_WORD
#define AL_STRUCT 1 #define AL_STRUCT 1
#define AL_UNION 1 #define AL_UNION 1

View file

@ -78,7 +78,7 @@ LLlex()
else { /* read ahead and return the old one */ else { /* read ahead and return the old one */
#ifdef LINT #ifdef LINT
lint_comment_ahead(); lint_comment_ahead();
#endif LINT #endif /* LINT */
dot = ahead; dot = ahead;
/* the following test is performed due to the dual /* the following test is performed due to the dual
task of LLlex(): it is also called for parsing the task of LLlex(): it is also called for parsing the
@ -164,7 +164,7 @@ firstline:
PushBack(); PushBack();
ch = '\\'; ch = '\\';
} }
#endif NOPP #endif /* NOPP */
if (040 < ch && ch < 0177) if (040 < ch && ch < 0177)
lexerror("garbage char %c", ch); lexerror("garbage char %c", ch);
else else
@ -274,7 +274,7 @@ firstline:
ptok->tk_fund = INT; ptok->tk_fund = INT;
return ptok->tk_symb = INTEGER; return ptok->tk_symb = INTEGER;
} }
#endif NOPP #endif /* NOPP */
ptok->tk_symb = ( ptok->tk_symb = (
idef->id_reserved ? idef->id_reserved idef->id_reserved ? idef->id_reserved
: idef->id_def && idef->id_def->df_sc == TYPEDEF ? : idef->id_def && idef->id_def->df_sc == TYPEDEF ?
@ -339,9 +339,9 @@ firstline:
/* in the rest of the compiler, all floats /* in the rest of the compiler, all floats
have to start with a digit. have to start with a digit.
*/ */
#else NOFLOAT #else /* NOFLOAT */
return ptok->tk_symb = ch; return ptok->tk_symb = ch;
#endif NOFLOAT #endif /* NOFLOAT */
} }
if (ch == '0') { if (ch == '0') {
*np++ = ch; *np++ = ch;
@ -366,7 +366,7 @@ firstline:
} }
#ifndef NOFLOAT #ifndef NOFLOAT
if (base == 16 || !(ch == '.' || ch == 'e' || ch == 'E')) if (base == 16 || !(ch == '.' || ch == 'e' || ch == 'E'))
#endif NOFLOAT #endif /* NOFLOAT */
{ {
PushBack(); PushBack();
ptok->tk_ival = val; ptok->tk_ival = val;
@ -424,7 +424,7 @@ firstline:
else else
ptok->tk_fval = Salloc(buf,(unsigned) (np - buf)) + 1; ptok->tk_fval = Salloc(buf,(unsigned) (np - buf)) + 1;
return ptok->tk_symb = FLOATING; return ptok->tk_symb = FLOATING;
#endif NOFLOAT #endif /* NOFLOAT */
} }
case STEOI: /* end of text on source file */ case STEOI: /* end of text on source file */
return ptok->tk_symb = EOI; return ptok->tk_symb = EOI;
@ -453,7 +453,7 @@ skipcomment()
#ifdef LINT #ifdef LINT
lint_start_comment(); lint_start_comment();
lint_comment_char(c); lint_comment_char(c);
#endif LINT #endif /* LINT */
do { do {
while (c != '*') { while (c != '*') {
if (class(c) == STNL) if (class(c) == STNL)
@ -463,22 +463,22 @@ skipcomment()
NoUnstack--; NoUnstack--;
#ifdef LINT #ifdef LINT
lint_end_comment(); lint_end_comment();
#endif LINT #endif /* LINT */
return; return;
} }
LoadChar(c); LoadChar(c);
#ifdef LINT #ifdef LINT
lint_comment_char(c); lint_comment_char(c);
#endif LINT #endif /* LINT */
} /* last Character seen was '*' */ } /* last Character seen was '*' */
LoadChar(c); LoadChar(c);
#ifdef LINT #ifdef LINT
lint_comment_char(c); lint_comment_char(c);
#endif LINT #endif /* LINT */
} while (c != '/'); } while (c != '/');
#ifdef LINT #ifdef LINT
lint_end_comment(); lint_end_comment();
#endif LINT #endif /* LINT */
NoUnstack--; NoUnstack--;
} }

View file

@ -31,7 +31,7 @@ struct token {
} tok_integer; } tok_integer;
#ifndef NOFLOAT #ifndef NOFLOAT
char *tok_fval; char *tok_fval;
#endif NOFLOAT #endif /* NOFLOAT */
} tok_data; } tok_data;
}; };
@ -45,7 +45,7 @@ struct token {
#define tk_ival tok_data.tok_integer.tok_ival #define tk_ival tok_data.tok_integer.tok_ival
#ifndef NOFLOAT #ifndef NOFLOAT
#define tk_fval tok_data.tok_fval #define tk_fval tok_data.tok_fval
#endif NOFLOAT #endif /* NOFLOAT */
extern struct token dot, ahead, aside; extern struct token dot, ahead, aside;
extern int token_nmb; /* number of the ahead token */ extern int token_nmb; /* number of the ahead token */
@ -56,7 +56,7 @@ extern int ReplaceMacros; /* "LLlex.c" */
extern int AccDefined; /* "LLlex.c" */ extern int AccDefined; /* "LLlex.c" */
extern int Unstacked; /* "LLlex.c" */ extern int Unstacked; /* "LLlex.c" */
extern int UnknownIdIsZero; /* "LLlex.c" */ extern int UnknownIdIsZero; /* "LLlex.c" */
#endif NOPP #endif /* NOPP */
extern int EoiForNewline; /* "LLlex.c" */ extern int EoiForNewline; /* "LLlex.c" */
extern int AccFileSpecifier; /* "LLlex.c" */ extern int AccFileSpecifier; /* "LLlex.c" */
extern int SkipEscNewline; /* "LLlex.c" */ extern int SkipEscNewline; /* "LLlex.c" */

View file

@ -56,6 +56,6 @@ insert_token(tk)
case FLOATING: case FLOATING:
dot.tk_fval = Salloc("0.0", 4); dot.tk_fval = Salloc("0.0", 4);
break; break;
#endif NOFLOAT #endif /* NOFLOAT */
} }
} }

View file

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

View file

@ -56,7 +56,7 @@
#ifndef NOFLOAT #ifndef NOFLOAT
#define SZ_FLOAT (arith)4 #define SZ_FLOAT (arith)4
#define SZ_DOUBLE (arith)8 #define SZ_DOUBLE (arith)8
#endif NOFLOAT #endif /* NOFLOAT */
#define SZ_POINTER (arith)4 #define SZ_POINTER (arith)4
/* target machine alignment requirements */ /* target machine alignment requirements */
@ -68,7 +68,7 @@
#ifndef NOFLOAT #ifndef NOFLOAT
#define AL_FLOAT SZ_WORD #define AL_FLOAT SZ_WORD
#define AL_DOUBLE SZ_WORD #define AL_DOUBLE SZ_WORD
#endif NOFLOAT #endif /* NOFLOAT */
#define AL_POINTER SZ_WORD #define AL_POINTER SZ_WORD
#define AL_STRUCT 1 #define AL_STRUCT 1
#define AL_UNION 1 #define AL_UNION 1

View file

@ -14,10 +14,10 @@ extern int
short_align, word_align, int_align, long_align, short_align, word_align, int_align, long_align,
#ifndef NOFLOAT #ifndef NOFLOAT
float_align, double_align, float_align, double_align,
#endif NOFLOAT #endif /* NOFLOAT */
pointer_align, pointer_align,
struct_align, union_align; struct_align, union_align;
#else NOCROSS #else /* NOCROSS */
#define short_align ((int)AL_SHORT) #define short_align ((int)AL_SHORT)
#define word_align ((int)AL_WORD) #define word_align ((int)AL_WORD)
#define int_align ((int)AL_INT) #define int_align ((int)AL_INT)
@ -25,10 +25,10 @@ extern int
#ifndef NOFLOAT #ifndef NOFLOAT
#define float_align ((int)AL_FLOAT) #define float_align ((int)AL_FLOAT)
#define double_align ((int)AL_DOUBLE) #define double_align ((int)AL_DOUBLE)
#endif NOFLOAT #endif /* NOFLOAT */
#define pointer_align ((int)AL_POINTER) #define pointer_align ((int)AL_POINTER)
#define struct_align ((int)AL_STRUCT) #define struct_align ((int)AL_STRUCT)
#define union_align ((int)AL_UNION) #define union_align ((int)AL_UNION)
#endif NOCROSS #endif /* NOCROSS */
extern arith align(); extern arith align();

View file

@ -52,7 +52,7 @@ arithbalance(e1p, oper, e2p) /* RM 6.6 */
int2float(e1p, double_type); int2float(e1p, double_type);
return; return;
} }
#endif NOFLOAT #endif /* NOFLOAT */
/* Now they are INT or LONG */ /* Now they are INT or LONG */
u1 = (*e1p)->ex_type->tp_unsigned; u1 = (*e1p)->ex_type->tp_unsigned;
@ -165,10 +165,10 @@ any2arith(expp, oper)
} }
else else
expr_warning(*expp, "%s on enum", symbol2str(oper)); expr_warning(*expp, "%s on enum", symbol2str(oper));
#endif NOROPTION #endif /* NOROPTION */
#ifndef LINT #ifndef LINT
int2int(expp, int_type); int2int(expp, int_type);
#endif LINT #endif /* LINT */
break; break;
#ifndef NOFLOAT #ifndef NOFLOAT
case FLOAT: case FLOAT:
@ -176,12 +176,12 @@ any2arith(expp, oper)
break; break;
case DOUBLE: case DOUBLE:
break; break;
#endif NOFLOAT #endif /* NOFLOAT */
#ifndef NOBITFIELD #ifndef NOBITFIELD
case FIELD: case FIELD:
field2arith(expp); field2arith(expp);
break; break;
#endif NOBITFIELD #endif /* NOBITFIELD */
default: default:
expr_error(*expp, "operator %s on non-numerical operand (%s)", expr_error(*expp, "operator %s on non-numerical operand (%s)",
symbol2str(oper), symbol2str(fund)); symbol2str(oper), symbol2str(fund));
@ -318,7 +318,7 @@ float2float(expp, tp)
else else
*expp = arith2arith(tp, FLOAT2FLOAT, *expp); *expp = arith2arith(tp, FLOAT2FLOAT, *expp);
} }
#endif NOFLOAT #endif /* NOFLOAT */
array2pointer(exp) array2pointer(exp)
register struct expr *exp; register struct expr *exp;
@ -386,7 +386,7 @@ opnd2logical(expp, oper)
else else
if (fund == FIELD) if (fund == FIELD)
field2arith(expp); field2arith(expp);
#endif NOBITFIELD #endif /* NOBITFIELD */
switch (fund = (*expp)->ex_type->tp_fund) { switch (fund = (*expp)->ex_type->tp_fund) {
case CHAR: case CHAR:
case SHORT: case SHORT:
@ -397,7 +397,7 @@ opnd2logical(expp, oper)
#ifndef NOFLOAT #ifndef NOFLOAT
case FLOAT: case FLOAT:
case DOUBLE: case DOUBLE:
#endif NOFLOAT #endif /* NOFLOAT */
break; break;
default: default:
expr_error(*expp, "%s operand to %s", expr_error(*expp, "%s operand to %s",
@ -456,7 +456,7 @@ any2opnd(expp, oper)
case ENUM: case ENUM:
#ifndef NOFLOAT #ifndef NOFLOAT
case FLOAT: case FLOAT:
#endif NOFLOAT #endif /* NOFLOAT */
any2arith(expp, oper); any2arith(expp, oper);
break; break;
case ARRAY: case ARRAY:
@ -470,7 +470,7 @@ any2opnd(expp, oper)
case FIELD: case FIELD:
field2arith(expp); field2arith(expp);
break; break;
#endif NOBITFIELD #endif /* NOBITFIELD */
} }
} }
@ -502,7 +502,7 @@ field2arith(expp)
} }
ch7cast(expp, CAST, tp); /* restore its original type */ ch7cast(expp, CAST, tp); /* restore its original type */
} }
#endif NOBITFIELD #endif /* NOBITFIELD */
#ifndef NOFLOAT #ifndef NOFLOAT
/* switch_sign_fp() negates the given floating constant expression /* switch_sign_fp() negates the given floating constant expression
@ -519,4 +519,4 @@ switch_sign_fp(expr)
else else
--(expr->FL_VALUE); --(expr->FL_VALUE);
} }
#endif NOFLOAT #endif /* NOFLOAT */

View file

@ -19,9 +19,9 @@
#include <em_arith.h> /* obtain definition of "arith" */ #include <em_arith.h> /* obtain definition of "arith" */
#else SPECIAL_ARITHMETICS #else /* SPECIAL_ARITHMETICS */
/* not implemented yet */ /* not implemented yet */
#define arith int /* dummy */ #define arith int /* dummy */
#endif SPECIAL_ARITHMETICS #endif /* SPECIAL_ARITHMETICS */

View file

@ -21,4 +21,4 @@
#else #else
#define ASSERT(exp) #define ASSERT(exp)
#define NOTREACHED() #define NOTREACHED()
#endif DEBUG #endif /* DEBUG */

View file

@ -20,7 +20,7 @@
#include "Lpars.h" #include "Lpars.h"
extern arith NewLocal(); extern arith NewLocal();
#define LocalPtrVar() NewLocal(pointer_size, pointer_align, reg_pointer, REGISTER) #define LocalPtrVar() NewLocal(pointer_size, pointer_align, reg_pointer, REGISTER)
#endif STB #endif /* STB */
/* Because EM does not support the loading and storing of /* Because EM does not support the loading and storing of
objects having other sizes than word fragment and multiple, objects having other sizes than word fragment and multiple,
@ -78,7 +78,7 @@ store_block(sz, al)
C_asp(ATW(sz)); C_asp(ATW(sz));
FreeLocal(dst); FreeLocal(dst);
FreeLocal(src); FreeLocal(src);
#else STB #else /* STB *?
/* address of destination lies on the stack */ /* address of destination lies on the stack */
/* push address of first byte of block on stack onto /* push address of first byte of block on stack onto
@ -90,7 +90,7 @@ store_block(sz, al)
C_loc(sz); /* number of bytes to transfer */ C_loc(sz); /* number of bytes to transfer */
C_cal("__stb"); /* call transfer routine */ C_cal("__stb"); /* call transfer routine */
C_asp(pointer_size + pointer_size + int_size + ATW(sz)); C_asp(pointer_size + pointer_size + int_size + ATW(sz));
#endif STB #endif /* STB */
} }
} }
@ -123,7 +123,7 @@ load_block(sz, al)
copy_loop(sz, src, dst); copy_loop(sz, src, dst);
FreeLocal(dst); FreeLocal(dst);
FreeLocal(src); FreeLocal(src);
#else STB #else /* STB */
C_asp(-(esz - pointer_size)); /* allocate stack block */ C_asp(-(esz - pointer_size)); /* allocate stack block */
C_lor((arith)1); /* push & of stack block as dst */ C_lor((arith)1); /* push & of stack block as dst */
C_dup(pointer_size); /* fetch source address */ C_dup(pointer_size); /* fetch source address */
@ -132,7 +132,7 @@ load_block(sz, al)
C_loc(sz); /* # bytes to copy */ C_loc(sz); /* # bytes to copy */
C_cal("__stb"); /* library copy routine */ C_cal("__stb"); /* library copy routine */
C_asp(int_size + pointer_size + pointer_size); C_asp(int_size + pointer_size + pointer_size);
#endif STB #endif /* STB */
} }
} }
@ -162,7 +162,7 @@ copy_loop(sz, src, dst)
C_df_ilb(l_stop); C_df_ilb(l_stop);
C_asp(word_size); C_asp(word_size);
} }
#endif STB #endif /* STB */
#endif LINT #endif /* LINT */

View file

@ -174,7 +174,7 @@ ch7cast(expp, oper, tp)
ch7cast(expp, oper, tp->tp_up); ch7cast(expp, oper, tp->tp_up);
} }
else else
#endif NOBITFIELD #endif /* NOBITFIELD */
if (oldtp == tp) { if (oldtp == tp) {
/* life is easy */ /* life is easy */
} }
@ -203,9 +203,9 @@ ch7cast(expp, oper, tp)
(*expp)->ex_type = tp; (*expp)->ex_type = tp;
else else
int2int(expp, tp); int2int(expp, tp);
#else LINT #else /* LINT */
int2int(expp, tp); int2int(expp, tp);
#endif LINT #endif /* LINT */
} }
#ifndef NOFLOAT #ifndef NOFLOAT
else else
@ -219,9 +219,9 @@ ch7cast(expp, oper, tp)
(*expp)->ex_type = tp; (*expp)->ex_type = tp;
else else
int2float(expp, tp); int2float(expp, tp);
#else LINT #else /* LINT */
int2float(expp, tp); int2float(expp, tp);
#endif LINT #endif /* LINT */
} }
else else
if (!oldi && i) { if (!oldi && i) {
@ -230,9 +230,9 @@ ch7cast(expp, oper, tp)
(*expp)->ex_type = tp; (*expp)->ex_type = tp;
else else
float2int(expp, tp); float2int(expp, tp);
#else LINT #else /* LINT */
float2int(expp, tp); float2int(expp, tp);
#endif LINT #endif /* LINT */
} }
else { else {
/* !oldi && !i */ /* !oldi && !i */
@ -241,16 +241,16 @@ ch7cast(expp, oper, tp)
(*expp)->ex_type = tp; (*expp)->ex_type = tp;
else else
float2float(expp, tp); float2float(expp, tp);
#else LINT #else /* LINT */
float2float(expp, tp); float2float(expp, tp);
#endif LINT #endif /* LINT */
} }
#else NOFLOAT #else /* NOFLOAT */
else { else {
crash("(ch7cast) floats not implemented\n"); crash("(ch7cast) floats not implemented\n");
/*NOTREACHED*/ /*NOTREACHED*/
} }
#endif NOFLOAT #endif /* NOFLOAT */
} }
else else
if (oldtp->tp_fund == POINTER && tp->tp_fund == POINTER) { if (oldtp->tp_fund == POINTER && tp->tp_fund == POINTER) {
@ -260,7 +260,7 @@ ch7cast(expp, oper, tp)
#ifdef LINT #ifdef LINT
if (oper != CAST) if (oper != CAST)
lint_ptr_conv(oldtp->tp_up->tp_fund, tp->tp_up->tp_fund); lint_ptr_conv(oldtp->tp_up->tp_fund, tp->tp_up->tp_fund);
#endif LINT #endif /* LINT */
(*expp)->ex_type = tp; /* free conversion */ (*expp)->ex_type = tp; /* free conversion */
} }
else else
@ -387,9 +387,9 @@ ch7asgn(expp, oper, expr)
exp = new_oper(exp->ex_type->tp_up, exp, oper, expr); exp = new_oper(exp->ex_type->tp_up, exp, oper, expr);
else else
exp = new_oper(exp->ex_type, exp, oper, expr); exp = new_oper(exp->ex_type, exp, oper, expr);
#else NOBITFIELD #else /* NOBITFIELD */
exp = new_oper(exp->ex_type, exp, oper, expr); exp = new_oper(exp->ex_type, exp, oper, expr);
#endif NOBITFIELD #endif /* NOBITFIELD */
exp->OP_TYPE = tp; /* for EVAL() */ exp->OP_TYPE = tp; /* for EVAL() */
exp->ex_flags |= EX_SIDEEFFECTS; exp->ex_flags |= EX_SIDEEFFECTS;
*expp = exp; *expp = exp;
@ -411,7 +411,7 @@ is_integral_type(tp)
#ifndef NOBITFIELD #ifndef NOBITFIELD
case FIELD: case FIELD:
return is_integral_type(tp->tp_up); return is_integral_type(tp->tp_up);
#endif NOBITFIELD #endif /* NOBITFIELD */
default: default:
return 0; return 0;
} }
@ -430,12 +430,12 @@ is_arith_type(tp)
#ifndef NOFLOAT #ifndef NOFLOAT
case FLOAT: case FLOAT:
case DOUBLE: case DOUBLE:
#endif NOFLOAT #endif /* NOFLOAT */
return 1; return 1;
#ifndef NOBITFIELD #ifndef NOBITFIELD
case FIELD: case FIELD:
return is_arith_type(tp->tp_up); return is_arith_type(tp->tp_up);
#endif NOBITFIELD #endif /* NOBITFIELD */
default: default:
return 0; return 0;
} }

View file

@ -74,7 +74,7 @@ ch7bin(expp, oper, expr)
#ifndef NOROPTION #ifndef NOROPTION
if (options['R']) if (options['R'])
warning("function pointer called"); warning("function pointer called");
#endif NOROPTION #endif /* NOROPTION */
ch7mon('*', expp); ch7mon('*', expp);
} }
switch ((*expp)->ex_type->tp_fund) { switch ((*expp)->ex_type->tp_fund) {
@ -265,7 +265,7 @@ ch7bin(expp, oper, expr)
) { ) {
hwarning("operands of : are constant and equal"); hwarning("operands of : are constant and equal");
} }
#endif LINT #endif /* LINT */
*expp = new_oper((*expp)->ex_type, *expp, oper, expr); *expp = new_oper((*expp)->ex_type, *expp, oper, expr);
break; break;
@ -274,7 +274,7 @@ ch7bin(expp, oper, expr)
if (is_cp_cst(*expp)) { if (is_cp_cst(*expp)) {
#ifdef LINT #ifdef LINT
hwarning("condition in ?: expression is constant"); hwarning("condition in ?: expression is constant");
#endif LINT #endif /* LINT */
*expp = (*expp)->VL_VALUE ? *expp = (*expp)->VL_VALUE ?
expr->OP_LEFT : expr->OP_RIGHT; expr->OP_LEFT : expr->OP_RIGHT;
} }
@ -287,7 +287,7 @@ ch7bin(expp, oper, expr)
if (is_cp_cst(*expp)) { if (is_cp_cst(*expp)) {
#ifdef LINT #ifdef LINT
hwarning("constant expression ignored"); hwarning("constant expression ignored");
#endif LINT #endif /* LINT */
*expp = expr; *expp = expr;
} }
else { else {
@ -356,7 +356,7 @@ pointer_arithmetic(expp1, oper, expp2)
"illegal combination of float and pointer"); "illegal combination of float and pointer");
erroneous2int(expp2); erroneous2int(expp2);
} }
#endif NOFLOAT #endif /* NOFLOAT */
ch7bin( expp2, '*', ch7bin( expp2, '*',
intexpr(size_of_type((*expp1)->ex_type->tp_up, "object"), intexpr(size_of_type((*expp1)->ex_type->tp_up, "object"),
pa_type->tp_fund) pa_type->tp_fund)

View file

@ -66,7 +66,7 @@ ch7mon(oper, expp)
if ((*expp)->ex_type->tp_fund == FIELD) if ((*expp)->ex_type->tp_fund == FIELD)
expr_error(*expp, "& applied to field variable"); expr_error(*expp, "& applied to field variable");
else else
#endif NOBITFIELD #endif /* NOBITFIELD */
if (!(*expp)->ex_lvalue) if (!(*expp)->ex_lvalue)
expr_error(*expp, "& applied to non-lvalue"); expr_error(*expp, "& applied to non-lvalue");
else { else {
@ -105,7 +105,7 @@ ch7mon(oper, expp)
} }
/* FALLTHROUGH */ /* FALLTHROUGH */
} }
#endif NOFLOAT #endif /* NOFLOAT */
case '-': case '-':
any2arith(expp, oper); any2arith(expp, oper);
if (is_cp_cst(*expp)) { if (is_cp_cst(*expp)) {
@ -123,7 +123,7 @@ ch7mon(oper, expp)
if (is_fp_cst(*expp)) if (is_fp_cst(*expp))
switch_sign_fp(*expp); switch_sign_fp(*expp);
else else
#endif NOFLOAT #endif /* NOFLOAT */
*expp = new_oper((*expp)->ex_type, *expp = new_oper((*expp)->ex_type,
NILEXPR, oper, *expp); NILEXPR, oper, *expp);
break; break;

View file

@ -12,7 +12,7 @@
#else #else
#include "l_em.h" #include "l_em.h"
#include "l_lint.h" #include "l_lint.h"
#endif LINT #endif /* LINT */
#include "botch_free.h" #include "botch_free.h"
#include <alloc.h> #include <alloc.h>
#include "dataflow.h" #include "dataflow.h"
@ -45,7 +45,7 @@ label datlab_count = 1;
#ifndef NOFLOAT #ifndef NOFLOAT
int fp_used; int fp_used;
#endif NOFLOAT #endif /* NOFLOAT */
/* global function info */ /* global function info */
char *func_name; char *func_name;
@ -55,7 +55,7 @@ int func_notypegiven;
#ifdef USE_TMP #ifdef USE_TMP
static int tmp_id; static int tmp_id;
static int pro_id; static int pro_id;
#endif USE_TMP #endif /* USE_TMP */
extern char options[]; extern char options[];
extern char *symbol2str(); extern char *symbol2str();
@ -93,10 +93,10 @@ init_code(dst_file)
#ifdef USE_TMP #ifdef USE_TMP
#ifdef PREPEND_SCOPES #ifdef PREPEND_SCOPES
C_insertpart(tmp_id = C_getid()); C_insertpart(tmp_id = C_getid());
#endif USE_TMP #endif /* USE_TMP */
#endif PREPEND_SCOPES #endif /* PREPEND_SCOPES */
} }
#endif LINT #endif /* LINT */
struct string_cst *str_list = 0; struct string_cst *str_list = 0;
@ -139,13 +139,13 @@ end_code()
/* floating point used */ /* floating point used */
C_ms_flt(); C_ms_flt();
} }
#endif NOFLOAT #endif /* NOFLOAT */
def_strings(str_list); def_strings(str_list);
str_list = 0; str_list = 0;
C_ms_src((int)(LineNumber - 2), FileName); C_ms_src((int)(LineNumber - 2), FileName);
C_close(); C_close();
} }
#endif LINT #endif /* LINT */
#ifdef PREPEND_SCOPES #ifdef PREPEND_SCOPES
prepend_scopes() prepend_scopes()
@ -158,7 +158,7 @@ prepend_scopes()
#ifdef USE_TMP #ifdef USE_TMP
C_beginpart(tmp_id); C_beginpart(tmp_id);
#endif USE_TMP #endif /* USE_TMP */
while (se != 0) { while (se != 0) {
register struct idf *id = se->se_idf; register struct idf *id = se->se_idf;
register struct def *df = id->id_def; register struct def *df = id->id_def;
@ -169,9 +169,9 @@ prepend_scopes()
} }
#ifdef USE_TMP #ifdef USE_TMP
C_endpart(tmp_id); C_endpart(tmp_id);
#endif USE_TMP #endif /* USE_TMP */
} }
#endif PREPEND_SCOPES #endif /* PREPEND_SCOPES */
code_scope(text, def) code_scope(text, def)
char *text; char *text;
@ -229,11 +229,11 @@ begin_proc(ds, idf) /* to be called when entering a procedure */
*/ */
#ifndef PREPEND_SCOPES #ifndef PREPEND_SCOPES
code_scope(name, def); code_scope(name, def);
#endif PREPEND_SCOPES #endif /* PREPEND_SCOPES */
#ifdef DATAFLOW #ifdef DATAFLOW
if (options['d']) if (options['d'])
DfaStartFunction(name); DfaStartFunction(name);
#endif DATAFLOW #endif /* DATAFLOW */
/* set global function info */ /* set global function info */
func_name = name; func_name = name;
@ -310,7 +310,7 @@ end_proc(fbytes)
#ifdef DATAFLOW #ifdef DATAFLOW
if (options['d']) if (options['d'])
DfaEndFunction(); DfaEndFunction();
#endif DATAFLOW #endif /* DATAFLOW */
C_df_ilb(return2_label); C_df_ilb(return2_label);
if (return_expr_occurred) C_asp(-func_size); if (return_expr_occurred) C_asp(-func_size);
C_df_ilb(return_label); C_df_ilb(return_label);
@ -327,7 +327,7 @@ end_proc(fbytes)
C_ret(func_size); C_ret(func_size);
} }
else C_ret((arith) 0); else C_ret((arith) 0);
#endif LINT #endif /* LINT */
/* getting the number of "local" bytes is posponed until here, /* getting the number of "local" bytes is posponed until here,
because copying the function result in "func_res_label" may because copying the function result in "func_res_label" may
@ -440,7 +440,7 @@ code_declaration(idf, expr, lvl, sc)
if (expr) { /* code only if initialized */ if (expr) { /* code only if initialized */
#ifndef PREPEND_SCOPES #ifndef PREPEND_SCOPES
code_scope(idf->id_text, def); code_scope(idf->id_text, def);
#endif PREPEND_SCOPES #endif /* PREPEND_SCOPES */
def->df_alloc = ALLOC_DONE; def->df_alloc = ALLOC_DONE;
C_df_dnam(idf->id_text); C_df_dnam(idf->id_text);
} }
@ -525,7 +525,7 @@ loc_init(expr, id)
if (e->OP_RIGHT != 0) /* int i = {1 , 2} */ if (e->OP_RIGHT != 0) /* int i = {1 , 2} */
expr_error(e, "too many initializers"); expr_error(e, "too many initializers");
} }
#endif NOROPTION #endif /* NOROPTION */
while (e) { while (e) {
loc_init(e->OP_LEFT, id); loc_init(e->OP_LEFT, id);
e = e->OP_RIGHT; e = e->OP_RIGHT;
@ -543,9 +543,9 @@ loc_init(expr, id)
vl.vl_value = (arith)0; vl.vl_value = (arith)0;
store_val(&vl, tp); store_val(&vl, tp);
} }
#else LINT #else /* LINT */
id->id_def->df_set = 1; id->id_def->df_set = 1;
#endif LINT #endif /* LINT */
free_expression(expr); free_expression(expr);
} }
} }
@ -559,7 +559,7 @@ bss(idf)
#ifndef PREPEND_SCOPES #ifndef PREPEND_SCOPES
code_scope(idf->id_text, idf->id_def); code_scope(idf->id_text, idf->id_def);
#endif PREPEND_SCOPES #endif /* PREPEND_SCOPES */
#ifdef DBSYMTAB #ifdef DBSYMTAB
if (options['g']) { if (options['g']) {
stb_string(idf->id_def, idf->id_def->df_sc, idf->id_text); stb_string(idf->id_def, idf->id_def->df_sc, idf->id_text);
@ -600,7 +600,7 @@ formal_cvt(df)
#ifdef LINT #ifdef LINT
/*ARGSUSED*/ /*ARGSUSED*/
#endif LINT #endif /* LINT */
code_expr(expr, val, code, tlbl, flbl) code_expr(expr, val, code, tlbl, flbl)
struct expr *expr; struct expr *expr;
label tlbl, flbl; label tlbl, flbl;
@ -616,9 +616,9 @@ code_expr(expr, val, code, tlbl, flbl)
if (options['g']) db_line(expr->ex_file, (unsigned int)expr->ex_line); if (options['g']) db_line(expr->ex_file, (unsigned int)expr->ex_line);
#endif #endif
EVAL(expr, val, code, tlbl, flbl); EVAL(expr, val, code, tlbl, flbl);
#else LINT #else /* LINT */
lint_expr(expr, code ? USED : IGNORED); lint_expr(expr, code ? USED : IGNORED);
#endif LINT #endif /* LINT */
} }
/* The FOR/WHILE/DO/SWITCH stacking mechanism: /* The FOR/WHILE/DO/SWITCH stacking mechanism:

View file

@ -19,7 +19,7 @@
#define T_UNSIGNED 2 #define T_UNSIGNED 2
#ifndef NOFLOAT #ifndef NOFLOAT
#define T_FLOATING 3 #define T_FLOATING 3
#endif NOFLOAT #endif /* NOFLOAT */
/* conversion() generates the EM code for a conversion between /* conversion() generates the EM code for a conversion between
the types char, short, int, long, float, double and pointer. the types char, short, int, long, float, double and pointer.
@ -54,7 +54,7 @@ conversion(from_type, to_type)
case T_UNSIGNED: case T_UNSIGNED:
#ifndef NOFLOAT #ifndef NOFLOAT
case T_FLOATING: case T_FLOATING:
#endif NOFLOAT #endif /* NOFLOAT */
if ((int)from_size < (int)word_size) { if ((int)from_size < (int)word_size) {
C_loc(from_size); C_loc(from_size);
C_loc(word_size); C_loc(word_size);
@ -83,7 +83,7 @@ conversion(from_type, to_type)
case T_FLOATING: case T_FLOATING:
C_cuf(); C_cuf();
break; break;
#endif NOFLOAT #endif /* NOFLOAT */
} }
break; break;
#ifndef NOFLOAT #ifndef NOFLOAT
@ -102,7 +102,7 @@ conversion(from_type, to_type)
break; break;
} }
break; break;
#endif NOFLOAT #endif /* NOFLOAT */
default: default:
crash("(conversion) illegal type conversion"); crash("(conversion) illegal type conversion");
/*NOTREACHED*/ /*NOTREACHED*/
@ -110,7 +110,7 @@ conversion(from_type, to_type)
if ((int)(to_type->tp_size) < (int)word_size if ((int)(to_type->tp_size) < (int)word_size
#ifndef NOFLOAT #ifndef NOFLOAT
&& to_cnvtype != T_FLOATING && to_cnvtype != T_FLOATING
#endif NOFLOAT #endif /* NOFLOAT */
) { ) {
extern long full_mask[]; extern long full_mask[];
@ -145,12 +145,12 @@ convtype(tp)
case FLOAT: case FLOAT:
case DOUBLE: case DOUBLE:
return T_FLOATING; return T_FLOATING;
#endif NOFLOAT #endif /* NOFLOAT */
case POINTER: case POINTER:
return T_UNSIGNED; return T_UNSIGNED;
} }
return 0; return 0;
} }
#endif LINT #endif /* LINT */

View file

@ -34,4 +34,4 @@ DfaCallFunction(s)
print("DFA: %s: %s\n", CurrentFunction, s); print("DFA: %s: %s\n", CurrentFunction, s);
++NumberOfCalls; ++NumberOfCalls;
} }
#endif DATAFLOW #endif /* DATAFLOW */

View file

@ -28,7 +28,7 @@
#include "level.h" #include "level.h"
#ifdef LINT #ifdef LINT
#include "l_lint.h" #include "l_lint.h"
#endif LINT #endif /* LINT */
extern char options[]; extern char options[];
} }
@ -170,7 +170,7 @@ init_declarator(register struct decspecs *ds;)
declare_idf(ds, &Dc, level); declare_idf(ds, &Dc, level);
#ifdef LINT #ifdef LINT
lint_declare_idf(Dc.dc_idf, ds->ds_sc); lint_declare_idf(Dc.dc_idf, ds->ds_sc);
#endif LINT #endif /* LINT */
} }
[ [
initializer(Dc.dc_idf, ds->ds_sc) initializer(Dc.dc_idf, ds->ds_sc)
@ -181,7 +181,7 @@ init_declarator(register struct decspecs *ds;)
{ {
#ifdef LINT #ifdef LINT
add_auto(Dc.dc_idf); add_auto(Dc.dc_idf);
#endif LINT #endif /* LINT */
remove_declarator(&Dc); remove_declarator(&Dc);
} }
; ;
@ -205,7 +205,7 @@ initializer(struct idf *idf; int sc;)
{ {
#ifdef LINT #ifdef LINT
lint_statement(); lint_statement();
#endif LINT #endif /* LINT */
if (globalflag) { if (globalflag) {
struct expr ex; struct expr ex;
code_declaration(idf, &ex, level, sc); code_declaration(idf, &ex, level, sc);
@ -220,10 +220,10 @@ initializer(struct idf *idf; int sc;)
} }
#ifdef DEBUG #ifdef DEBUG
print_expr("initializer-expression", expr); print_expr("initializer-expression", expr);
#endif DEBUG #endif /* DEBUG */
#ifdef LINT #ifdef LINT
change_state(idf, SET); change_state(idf, SET);
#endif LINT #endif /* LINT */
#ifdef DBSYMTAB #ifdef DBSYMTAB
if (options['g'] && level >= L_LOCAL && expr) { if (options['g'] && level >= L_LOCAL && expr) {
db_line(expr->ex_file, (unsigned) expr->ex_line) db_line(expr->ex_file, (unsigned) expr->ex_line)
@ -487,7 +487,7 @@ bit_expression(struct field **fd;)
free_expression(expr); free_expression(expr);
#ifdef NOBITFIELD #ifdef NOBITFIELD
error("bitfields are not implemented"); error("bitfields are not implemented");
#endif NOBITFIELD #endif /* NOBITFIELD */
} }
; ;

View file

@ -72,7 +72,7 @@ do_decspecs(ds)
if (tp == float_type) if (tp == float_type)
tp = double_type; tp = double_type;
else else
#endif NOFLOAT #endif /* NOFLOAT */
error("long with illegal type"); error("long with illegal type");
break; break;
} }

View file

@ -26,7 +26,7 @@ struct def { /* for ordinary tags */
char df_set; char df_set;
int df_firstbrace; /* brace number of its first occurrence */ int df_firstbrace; /* brace number of its first occurrence */
int df_minlevel; /* the lowest level needed for this def */ int df_minlevel; /* the lowest level needed for this def */
#endif LINT #endif /* LINT */
char df_formal_array; /* to warn if sizeof is taken */ char df_formal_array; /* to warn if sizeof is taken */
arith df_address; arith df_address;
}; };

View file

@ -665,7 +665,7 @@ macroeq(s, t)
return (*s == '\0') && (*t == '\0'); return (*s == '\0') && (*t == '\0');
} }
} }
#else NOPP #else /* NOPP */
EXPORT EXPORT
domacro() domacro()
{ {
@ -691,7 +691,7 @@ domacro()
EoiForNewline = 0; EoiForNewline = 0;
SkipEscNewline = 0; SkipEscNewline = 0;
} }
#endif NOPP #endif /* NOPP */
PRIVATE PRIVATE
SkipRestOfLine() SkipRestOfLine()

View file

@ -118,7 +118,7 @@ dumpidf(idf, opt)
} }
print(" macro"); print(" macro");
} }
#endif NOPP #endif /* NOPP */
if ((opt&2) && idf->id_reserved) { if ((opt&2) && idf->id_reserved) {
if (!started++) { if (!started++) {
newline(); newline();
@ -223,7 +223,7 @@ dumpsdefs(sdef, sdk)
print("L%d: ", sdef->sd_level); print("L%d: ", sdef->sd_level);
#ifndef NOBITFIELD #ifndef NOBITFIELD
if (sdk == selector) if (sdk == selector)
#endif NOBITFIELD #endif /* NOBITFIELD */
print("selector %s at offset %lu in %s;", print("selector %s at offset %lu in %s;",
type2str(sdef->sd_type), type2str(sdef->sd_type),
sdef->sd_offset, type2str(sdef->sd_stype) sdef->sd_offset, type2str(sdef->sd_stype)
@ -232,7 +232,7 @@ dumpsdefs(sdef, sdk)
else print("field %s at offset %lu;", else print("field %s at offset %lu;",
type2str(sdef->sd_type), sdef->sd_offset type2str(sdef->sd_type), sdef->sd_offset
); );
#endif NOBITFIELD #endif /* NOBITFIELD */
sdef = (sdk == selector ? sdef->next : sdef->sd_sdef); sdef = (sdk == selector ? sdef->next : sdef->sd_sdef);
} }
dumplevel--; dumplevel--;
@ -281,7 +281,7 @@ type2str(tp)
fd->fd_shift, fd->fd_width); fd->fd_shift, fd->fd_width);
} }
else else
#endif NOBITFIELD #endif /* NOBITFIELD */
ops = 0; ops = 0;
break; break;
} }
@ -334,7 +334,7 @@ p1_expr(lvl, expr)
expr->ex_class == String ? "String" : expr->ex_class == String ? "String" :
#ifndef NOFLOAT #ifndef NOFLOAT
expr->ex_class == Float ? "Float" : expr->ex_class == Float ? "Float" :
#endif NOFLOAT #endif /* NOFLOAT */
expr->ex_class == Oper ? "Oper" : expr->ex_class == Oper ? "Oper" :
expr->ex_class == Type ? "Type" : "UNKNOWN CLASS" expr->ex_class == Type ? "Type" : "UNKNOWN CLASS"
); );
@ -373,7 +373,7 @@ p1_expr(lvl, expr)
case Float: case Float:
print("%s\n", expr->FL_VALUE); print("%s\n", expr->FL_VALUE);
break; break;
#endif NOFLOAT #endif /* NOFLOAT */
case Oper: case Oper:
o = &expr->ex_object.ex_oper; o = &expr->ex_object.ex_oper;
print("\n"); print("\n");
@ -399,4 +399,4 @@ p1_indent(lvl)
while (lvl--) while (lvl--)
print(" "); print(" ");
} }
#endif DEBUG #endif /* DEBUG */

View file

@ -12,7 +12,7 @@
#include <em.h> #include <em.h>
#else #else
#include "l_em.h" #include "l_em.h"
#endif LINT #endif /* LINT */
#include "nopp.h" #include "nopp.h"
#include "errout.h" #include "errout.h"
@ -41,7 +41,7 @@ int err_occurred = 0;
extern char options[]; extern char options[];
#ifdef LINT #ifdef LINT
extern char loptions[]; extern char loptions[];
#endif LINT #endif /* LINT */
/* There are three general error-message functions: /* There are three general error-message functions:
lexerror() lexical and pre-processor error messages lexerror() lexical and pre-processor error messages
@ -165,7 +165,7 @@ awarning(va_alist) /* fmt, args */
va_end(ap); va_end(ap);
} }
#endif LINT #endif /* LINT */
/*VARARGS*/ /*VARARGS*/
lexerror(va_alist) /* fmt, args */ lexerror(va_alist) /* fmt, args */
@ -193,7 +193,7 @@ lexwarning(va_alist) /* fmt, args */
} }
va_end(ap); va_end(ap);
} }
#endif NOPP #endif /* NOPP */
/*VARARGS*/ /*VARARGS*/
crash(va_alist) /* fmt, args */ crash(va_alist) /* fmt, args */
@ -210,9 +210,9 @@ crash(va_alist) /* fmt, args */
C_close(); C_close();
#ifdef DEBUG #ifdef DEBUG
sys_stop(S_ABORT); sys_stop(S_ABORT);
#else DEBUG #else /* DEBUG */
sys_stop(S_EXIT); sys_stop(S_EXIT);
#endif DEBUG #endif /* DEBUG */
/* NOTREACHED */ /* NOTREACHED */
} }
@ -278,9 +278,9 @@ _error(class, fn, ln, ap)
case WARNING: case WARNING:
#ifndef LINT #ifndef LINT
remark = "(warning)"; remark = "(warning)";
#else LINT #else /* LINT */
remark = 0; remark = 0;
#endif LINT #endif /* LINT */
break; break;
case ERROR: case ERROR:
@ -309,7 +309,7 @@ _error(class, fn, ln, ap)
/* we skip this message */ /* we skip this message */
return; return;
} }
#endif LINT #endif /* LINT */
if (fn) if (fn)
fprint(ERROUT, "\"%s\", line %u: ", fn, ln); fprint(ERROUT, "\"%s\", line %u: ", fn, ln);

View file

@ -101,7 +101,7 @@ EVAL(expr, val, code, true_label, false_label)
C_loi(expr->ex_type->tp_size); C_loi(expr->ex_type->tp_size);
} }
break; break;
#endif NOFLOAT #endif /* NOFLOAT */
case Oper: /* compound expression */ case Oper: /* compound expression */
{ {
int oper = expr->OP_OPER; int oper = expr->OP_OPER;
@ -142,7 +142,7 @@ EVAL(expr, val, code, true_label, false_label)
case DOUBLE: case DOUBLE:
C_adf(tp->tp_size); C_adf(tp->tp_size);
break; break;
#endif NOFLOAT #endif /* NOFLOAT */
default: default:
crash("bad type +"); crash("bad type +");
} }
@ -162,7 +162,7 @@ EVAL(expr, val, code, true_label, false_label)
case DOUBLE: case DOUBLE:
C_ngf(tp->tp_size); C_ngf(tp->tp_size);
break; break;
#endif NOFLOAT #endif /* NOFLOAT */
default: default:
CRASH(); CRASH();
} }
@ -200,7 +200,7 @@ EVAL(expr, val, code, true_label, false_label)
case DOUBLE: case DOUBLE:
C_sbf(tp->tp_size); C_sbf(tp->tp_size);
break; break;
#endif NOFLOAT #endif /* NOFLOAT */
default: default:
crash("bad type -"); crash("bad type -");
} }
@ -229,7 +229,7 @@ EVAL(expr, val, code, true_label, false_label)
case DOUBLE: case DOUBLE:
C_mlf(double_size); C_mlf(double_size);
break; break;
#endif NOFLOAT #endif /* NOFLOAT */
default: default:
crash("bad type *"); crash("bad type *");
} }
@ -252,7 +252,7 @@ EVAL(expr, val, code, true_label, false_label)
case DOUBLE: case DOUBLE:
C_dvf(double_size); C_dvf(double_size);
break; break;
#endif NOFLOAT #endif /* NOFLOAT */
default: default:
crash("bad type /"); crash("bad type /");
} }
@ -310,7 +310,7 @@ EVAL(expr, val, code, true_label, false_label)
case DOUBLE: case DOUBLE:
C_cmf(size); C_cmf(size);
break; break;
#endif NOFLOAT #endif /* NOFLOAT */
case POINTER: case POINTER:
C_cmp(); C_cmp();
break; break;
@ -360,7 +360,7 @@ EVAL(expr, val, code, true_label, false_label)
eval_field(expr, gencode); eval_field(expr, gencode);
break; break;
} }
#endif NOBITFIELD #endif /* NOBITFIELD */
EVAL(right, RVAL, newcode, NO_LABEL, NO_LABEL); EVAL(right, RVAL, newcode, NO_LABEL, NO_LABEL);
if (gencode) if (gencode)
C_dup(ATW(tp->tp_size)); C_dup(ATW(tp->tp_size));
@ -397,7 +397,7 @@ EVAL(expr, val, code, true_label, false_label)
eval_field(expr, gencode); eval_field(expr, gencode);
break; break;
} }
#endif NOBITFIELD #endif /* NOBITFIELD */
if (newcode && left->ex_class == Value) { if (newcode && left->ex_class == Value) {
compl = 0; /* Value */ compl = 0; /* Value */
} }
@ -520,7 +520,7 @@ EVAL(expr, val, code, true_label, false_label)
DfaCallFunction( DfaCallFunction(
left->VL_IDF->id_text); left->VL_IDF->id_text);
} }
#endif DATAFLOW #endif /* DATAFLOW */
} }
else { else {
EVAL(left, LVAL, TRUE, NO_LABEL, NO_LABEL); EVAL(left, LVAL, TRUE, NO_LABEL, NO_LABEL);
@ -624,7 +624,7 @@ EVAL(expr, val, code, true_label, false_label)
case INT2FLOAT: case INT2FLOAT:
case FLOAT2INT: case FLOAT2INT:
case FLOAT2FLOAT: case FLOAT2FLOAT:
#endif NOFLOAT #endif /* NOFLOAT */
EVAL(right, RVAL, gencode, NO_LABEL, NO_LABEL); EVAL(right, RVAL, gencode, NO_LABEL, NO_LABEL);
if (gencode) if (gencode)
conversion(right->ex_type, left->ex_type); conversion(right->ex_type, left->ex_type);
@ -800,7 +800,7 @@ assop(type, oper)
break; break;
} }
break; break;
#endif NOFLOAT #endif /* NOFLOAT */
case POINTER: case POINTER:
if (oper == MINAB || oper == MINMIN || oper == POSTDECR) if (oper == MINAB || oper == MINMIN || oper == POSTDECR)
C_ngi(size); C_ngi(size);
@ -1004,5 +1004,5 @@ load_cst(val, siz)
} }
} }
#endif LINT #endif /* LINT */

View file

@ -148,7 +148,7 @@ dot2expr(expp)
case FLOATING: case FLOATING:
float2expr(ex); float2expr(ex);
break; break;
#endif NOFLOAT #endif /* NOFLOAT */
default: default:
crash("bad conversion to expression"); crash("bad conversion to expression");
/*NOTREACHED*/ /*NOTREACHED*/
@ -188,9 +188,9 @@ idf2expr(expr)
def->df_used = 1; def->df_used = 1;
#ifndef PREPEND_SCOPES #ifndef PREPEND_SCOPES
code_scope(idf->id_text, def); code_scope(idf->id_text, def);
#endif PREPEND_SCOPES #endif /* PREPEND_SCOPES */
} }
#endif LINT #endif /* LINT */
expr->ex_type = def->df_type; expr->ex_type = def->df_type;
if (expr->ex_type == error_type) if (expr->ex_type == error_type)
expr->ex_flags |= EX_ERROR; expr->ex_flags |= EX_ERROR;
@ -212,7 +212,7 @@ idf2expr(expr)
expr->VL_LBL = def->df_address; expr->VL_LBL = def->df_address;
expr->VL_VALUE = (arith)0; expr->VL_VALUE = (arith)0;
} }
#endif LINT #endif /* LINT */
else { else {
expr->VL_CLASS = Name; expr->VL_CLASS = Name;
expr->VL_IDF = idf; expr->VL_IDF = idf;
@ -254,7 +254,7 @@ float2expr(expr)
expr->FL_VALUE = dot.tk_fval; expr->FL_VALUE = dot.tk_fval;
expr->FL_DATLAB = 0; expr->FL_DATLAB = 0;
} }
#endif NOFLOAT #endif /* NOFLOAT */
struct expr* struct expr*
intexpr(ivalue, fund) intexpr(ivalue, fund)
@ -377,7 +377,7 @@ new_oper(tp, e1, oper, e2)
op->op_right = e2; op->op_right = e2;
#ifdef LINT #ifdef LINT
lint_new_oper(expr); lint_new_oper(expr);
#endif LINT #endif /* LINT */
return expr; return expr;
} }
@ -418,7 +418,7 @@ chk_cst_expr(expp)
#ifdef DEBUG #ifdef DEBUG
print_expr("constant_expression", expr); print_expr("constant_expression", expr);
#endif DEBUG #endif /* DEBUG */
if ( fund != CHAR && fund != SHORT && fund != INT && if ( fund != CHAR && fund != SHORT && fund != INT &&
fund != ENUM && fund != LONG fund != ENUM && fund != LONG
) )
@ -437,7 +437,7 @@ chk_cst_expr(expp)
expr_warning(expr, expr_warning(expr,
"expression comma in constant expression"); "expression comma in constant expression");
} }
#endif NOROPTION #endif /* NOROPTION */
if (err) if (err)
erroneous2int(expp); erroneous2int(expp);
} }
@ -471,7 +471,7 @@ is_ld_cst(expr)
#ifdef LINT #ifdef LINT
if (expr->ex_class == String) if (expr->ex_class == String)
return 1; return 1;
#endif LINT #endif /* LINT */
return expr->ex_lvalue == 0 && expr->ex_class == Value; return expr->ex_lvalue == 0 && expr->ex_class == Value;
} }
@ -495,7 +495,7 @@ is_fp_cst(expr)
*/ */
return expr->ex_class == Float; return expr->ex_class == Float;
} }
#endif NOFLOAT #endif /* NOFLOAT */
free_expression(expr) free_expression(expr)
register struct expr *expr; register struct expr *expr;

View file

@ -36,7 +36,7 @@ struct floating {
char *fl_value; /* pointer to string repr. the fp const. */ char *fl_value; /* pointer to string repr. the fp const. */
label fl_datlab; /* global data_label */ label fl_datlab; /* global data_label */
}; };
#endif NOFLOAT #endif /* NOFLOAT */
struct oper { struct oper {
struct type *op_type; /* resulting type of the operation */ struct type *op_type; /* resulting type of the operation */
@ -50,7 +50,7 @@ struct oper {
#define String 1 /* it is a string constant */ #define String 1 /* it is a string constant */
#ifndef NOFLOAT #ifndef NOFLOAT
#define Float 2 /* it is a floating point constant */ #define Float 2 /* it is a floating point constant */
#endif NOFLOAT #endif /* NOFLOAT */
#define Oper 3 /* it is a run-time expression */ #define Oper 3 /* it is a run-time expression */
#define Type 4 /* only its type is relevant */ #define Type 4 /* only its type is relevant */
@ -68,7 +68,7 @@ struct expr {
struct string ex_string; struct string ex_string;
#ifndef NOFLOAT #ifndef NOFLOAT
struct floating ex_float; struct floating ex_float;
#endif NOFLOAT #endif /* NOFLOAT */
struct oper ex_oper; struct oper ex_oper;
} ex_object; } ex_object;
}; };
@ -85,7 +85,7 @@ struct expr {
#ifndef NOFLOAT #ifndef NOFLOAT
#define FL_VALUE ex_object.ex_float.fl_value #define FL_VALUE ex_object.ex_float.fl_value
#define FL_DATLAB ex_object.ex_float.fl_datlab #define FL_DATLAB ex_object.ex_float.fl_datlab
#endif NOFLOAT #endif /* NOFLOAT */
#define OP_TYPE ex_object.ex_oper.op_type #define OP_TYPE ex_object.ex_oper.op_type
#define OP_LEFT ex_object.ex_oper.op_left #define OP_LEFT ex_object.ex_oper.op_left
#define OP_OPER ex_object.ex_oper.op_oper #define OP_OPER ex_object.ex_oper.op_oper

View file

@ -176,7 +176,7 @@ eval_field(expr, code)
conversion(atype, expr->ex_type); conversion(atype, expr->ex_type);
} }
} }
#endif NOBITFIELD #endif /* NOBITFIELD */
#endif LINT #endif /* LINT */

View file

@ -91,7 +91,7 @@ idf_hashed(tg, size, hc)
notch->id_text = Salloc(tg, (unsigned) size); notch->id_text = Salloc(tg, (unsigned) size);
#ifndef NOPP #ifndef NOPP
notch->id_resmac = 0; notch->id_resmac = 0;
#endif NOPP #endif /* NOPP */
return notch; return notch;
} }
@ -115,7 +115,7 @@ hash_stat()
print("End hash table tally\n"); print("End hash table tally\n");
} }
} }
#endif DEBUG #endif /* DEBUG */
struct idf * struct idf *
str2idf(tg) str2idf(tg)
@ -231,7 +231,7 @@ declare_idf(ds, dc, lvl)
case FLOAT: /* RM 10.1 */ case FLOAT: /* RM 10.1 */
type = double_type; type = double_type;
break; break;
#endif NOFLOAT #endif /* NOFLOAT */
case CHAR: case CHAR:
case SHORT: case SHORT:
/* The RM is not clear about this: we must /* The RM is not clear about this: we must
@ -274,7 +274,7 @@ declare_idf(ds, dc, lvl)
#ifdef LINT #ifdef LINT
check_hiding(idf, lvl, sc); /* of some idf by this idf */ check_hiding(idf, lvl, sc); /* of some idf by this idf */
#endif LINT #endif /* LINT */
if (def && if (def &&
( def->df_level == lvl || ( def->df_level == lvl ||
@ -339,7 +339,7 @@ declare_idf(ds, dc, lvl)
#ifdef LINT #ifdef LINT
newdef->df_set = 0; newdef->df_set = 0;
newdef->df_firstbrace = 0; newdef->df_firstbrace = 0;
#endif LINT #endif /* LINT */
/* link it into the name list in the proper place */ /* link it into the name list in the proper place */
idf->id_def = newdef; idf->id_def = newdef;
@ -478,14 +478,14 @@ global_redecl(idf, new_sc, tp)
/* warn unconditionally */ /* warn unconditionally */
warning("%s redeclared to static", warning("%s redeclared to static",
idf->id_text); idf->id_text);
#else LINT #else /* LINT */
#ifndef NOROPTION #ifndef NOROPTION
/* warn conditionally */ /* warn conditionally */
if (options['R']) if (options['R'])
warning("%s redeclared to static", warning("%s redeclared to static",
idf->id_text); idf->id_text);
#endif NOROPTION #endif /* NOROPTION */
#endif LINT #endif /* LINT */
def->df_sc = STATIC; def->df_sc = STATIC;
} }
break; break;
@ -627,7 +627,7 @@ declare_formals(fp)
#ifdef DEBUG #ifdef DEBUG
if (options['t']) if (options['t'])
dumpidftab("start declare_formals", 0); dumpidftab("start declare_formals", 0);
#endif DEBUG #endif /* DEBUG */
while (se) { while (se) {
register struct def *def = se->se_idf->id_def; register struct def *def = se->se_idf->id_def;
@ -664,7 +664,7 @@ regtype(tp)
case FLOAT: case FLOAT:
case DOUBLE: case DOUBLE:
return reg_float; return reg_float;
#endif NOFLOAT #endif /* NOFLOAT */
case POINTER: case POINTER:
return reg_pointer; return reg_pointer;
} }

View file

@ -32,7 +32,7 @@ struct idf {
#ifndef NOPP #ifndef NOPP
struct macro *id_macro; struct macro *id_macro;
int id_resmac; /* if nonzero: keyword of macroproc. */ int id_resmac; /* if nonzero: keyword of macroproc. */
#endif NOPP #endif /* NOPP */
int id_reserved; /* non-zero for reserved words */ int id_reserved; /* non-zero for reserved words */
char *id_file; /* file containing the occurrence */ char *id_file; /* file containing the occurrence */
unsigned int id_line; /* line number of the occurrence */ unsigned int id_line; /* line number of the occurrence */

View file

@ -79,4 +79,4 @@ init_pp()
/* defined(??) */ /* defined(??) */
macro_def(str2idf("defined"), "", 1, 1, FUNC); macro_def(str2idf("defined"), "", 1, 1, FUNC);
} }
#endif NOPP #endif /* NOPP */

View file

@ -46,7 +46,7 @@ getwdir(fn)
} }
int InputLevel; int InputLevel;
#endif NOPP #endif /* NOPP */
int NoUnstack; int NoUnstack;
@ -56,7 +56,7 @@ AtEoIT()
/* if (NoUnstack) lexwarning("unexpected EOF"); ??? */ /* if (NoUnstack) lexwarning("unexpected EOF"); ??? */
DoUnstack(); DoUnstack();
InputLevel--; InputLevel--;
#endif NOPP #endif /* NOPP */
return 0; return 0;
} }
@ -66,7 +66,7 @@ AtEoIF()
if (nestlevel != nestlow) lexwarning("missing #endif"); if (nestlevel != nestlow) lexwarning("missing #endif");
else else
#endif NOPP #endif /* NOPP */
if (NoUnstack) lexerror("unexpected EOF"); if (NoUnstack) lexerror("unexpected EOF");
#ifndef NOPP #ifndef NOPP
nestlevel = nestlow; nestlevel = nestlow;

View file

@ -13,7 +13,7 @@
#else #else
#include "l_em.h" #include "l_em.h"
#include "l_lint.h" #include "l_lint.h"
#endif LINT #endif /* LINT */
#include "debug.h" #include "debug.h"
#include <alloc.h> #include <alloc.h>
#include "nobitfield.h" #include "nobitfield.h"
@ -58,7 +58,7 @@ initial_value(register struct type **tpp; register struct expr **expp;) :
{ {
#ifdef LINT #ifdef LINT
lint_expr(*expp, USED); lint_expr(*expp, USED);
#endif LINT #endif /* LINT */
if ((*expp)->ex_type->tp_fund == ARRAY) if ((*expp)->ex_type->tp_fund == ARRAY)
array2pointer(*expp); array2pointer(*expp);
if (tpp) { if (tpp) {
@ -440,7 +440,7 @@ pad(tpx)
case FIELD: case FIELD:
put_bf(tp, (arith)0); put_bf(tp, (arith)0);
return; return;
#endif NOBITFIELD #endif /* NOBITFIELD */
default: default:
break; break;
} }
@ -483,7 +483,7 @@ check_ival(expp, tp)
expr = *expp; expr = *expp;
#ifdef DEBUG #ifdef DEBUG
print_expr("init-expr after cast", expr); print_expr("init-expr after cast", expr);
#endif DEBUG #endif /* DEBUG */
if (!is_ld_cst(expr)) if (!is_ld_cst(expr))
illegal_init_cst(expr); illegal_init_cst(expr);
else else
@ -513,7 +513,7 @@ check_ival(expp, tp)
expr = *expp; expr = *expp;
#ifdef DEBUG #ifdef DEBUG
print_expr("init-expr after cast", expr); print_expr("init-expr after cast", expr);
#endif DEBUG #endif /* DEBUG */
if (expr->ex_class == Float) if (expr->ex_class == Float)
C_con_fcon(expr->FL_VALUE, expr->ex_type->tp_size); C_con_fcon(expr->FL_VALUE, expr->ex_type->tp_size);
#ifdef NOTDEF #ifdef NOTDEF
@ -533,11 +533,11 @@ and also to prevent runtime coercions for compile-time constants.
else else
illegal_init_cst(expr); illegal_init_cst(expr);
} }
#endif NOTDEF #endif /* NOTDEF */
else else
illegal_init_cst(expr); illegal_init_cst(expr);
break; break;
#endif NOFLOAT #endif /* NOFLOAT */
#ifndef NOBITFIELD #ifndef NOBITFIELD
case FIELD: case FIELD:
@ -545,13 +545,13 @@ and also to prevent runtime coercions for compile-time constants.
expr = *expp; expr = *expp;
#ifdef DEBUG #ifdef DEBUG
print_expr("init-expr after cast", expr); print_expr("init-expr after cast", expr);
#endif DEBUG #endif /* DEBUG */
if (is_cp_cst(expr)) if (is_cp_cst(expr))
put_bf(tp, expr->VL_VALUE); put_bf(tp, expr->VL_VALUE);
else else
illegal_init_cst(expr); illegal_init_cst(expr);
break; break;
#endif NOBITFIELD #endif /* NOBITFIELD */
case ERRONEOUS: case ERRONEOUS:
if (! gen_error) gen_error = pack_level; if (! gen_error) gen_error = pack_level;
@ -653,7 +653,7 @@ put_bf(tp, val)
offset = (arith)-1; offset = (arith)-1;
} }
} }
#endif NOBITFIELD #endif /* NOBITFIELD */
int int
zero_bytes(sd) zero_bytes(sd)

View file

@ -208,4 +208,4 @@ make_format(argn, oldf)
*newf++ = '\0'; *newf++ = '\0';
} }
#endif LINT #endif /* LINT */

View file

@ -14,7 +14,7 @@
#include "assert.h" #include "assert.h"
#ifdef ANSI #ifdef ANSI
#include <flt_arith.h> #include <flt_arith.h>
#endif ANSI #endif /* ANSI */
#include "arith.h" /* definition arith */ #include "arith.h" /* definition arith */
#include "label.h" /* definition label */ #include "label.h" /* definition label */
#include "expr.h" #include "expr.h"
@ -106,4 +106,4 @@ check_ev_order(esp1, esp2, expr)
} }
} }
#endif LINT #endif /* LINT */

View file

@ -15,7 +15,7 @@
#include "assert.h" #include "assert.h"
#ifdef ANSI #ifdef ANSI
#include <flt_arith.h> #include <flt_arith.h>
#endif ANSI #endif /* ANSI */
#include "arith.h" /* definition arith */ #include "arith.h" /* definition arith */
#include "label.h" /* definition label */ #include "label.h" /* definition label */
#include "expr.h" #include "expr.h"
@ -450,6 +450,6 @@ print_esp(msg, esp)
} }
print(">\n"); print(">\n");
} }
#endif DEBUG #endif /* DEBUG */
#endif LINT #endif /* LINT */

View file

@ -13,7 +13,7 @@
#include "interface.h" #include "interface.h"
#ifdef ANSI #ifdef ANSI
#include <flt_arith.h> #include <flt_arith.h>
#endif ANSI #endif /* ANSI */
#include "arith.h" /* definition arith */ #include "arith.h" /* definition arith */
#include "label.h" /* definition label */ #include "label.h" /* definition label */
#include "expr.h" #include "expr.h"
@ -424,4 +424,4 @@ lint_relop(left, right, oper)
} }
} }
#endif LINT #endif /* LINT */

View file

@ -13,7 +13,7 @@
#include "interface.h" #include "interface.h"
#ifdef ANSI #ifdef ANSI
#include <flt_arith.h> #include <flt_arith.h>
#endif ANSI #endif /* ANSI */
#include "arith.h" #include "arith.h"
#include "assert.h" #include "assert.h"
#include "type.h" #include "type.h"
@ -501,7 +501,7 @@ implicit_func_decl(idf, file, line)
output_def(&od); output_def(&od);
/* The other fields are not used for this class. */ /* The other fields are not used for this class. */
} }
#endif IMPLICIT #endif /* IMPLICIT */
fill_outcall(ex, used) fill_outcall(ex, used)
struct expr *ex; struct expr *ex;
@ -515,7 +515,7 @@ fill_outcall(ex, used)
/* IFDC, first time */ /* IFDC, first time */
implicit_func_decl(idf, ex->ex_file, ex->ex_line); implicit_func_decl(idf, ex->ex_file, ex->ex_line);
} }
#endif IMPLICIT #endif /* IMPLICIT */
OutCall.od_type = def->df_type->tp_up; OutCall.od_type = def->df_type->tp_up;
OutCall.od_statnr = (def->df_sc == STATIC ? stat_number : 0); OutCall.od_statnr = (def->df_sc == STATIC ? stat_number : 0);
@ -580,4 +580,4 @@ add_expr_arg(e)
OutCall.od_nrargs++; OutCall.od_nrargs++;
} }
#endif LINT #endif /* LINT */

View file

@ -15,7 +15,7 @@
#include "debug.h" #include "debug.h"
#ifdef ANSI #ifdef ANSI
#include <flt_arith.h> #include <flt_arith.h>
#endif ANSI #endif /* ANSI */
#include "arith.h" #include "arith.h"
#include "label.h" #include "label.h"
#include "expr.h" #include "expr.h"
@ -37,7 +37,7 @@
#define dbg_lint_stack(m) /*print_lint_stack(m) /* or not */ #define dbg_lint_stack(m) /*print_lint_stack(m) /* or not */
#else #else
#define dbg_lint_stack(m) #define dbg_lint_stack(m)
#endif DEBUG #endif /* DEBUG */
extern char *symbol2str(); extern char *symbol2str();
extern char *func_name; extern char *func_name;
@ -205,7 +205,7 @@ lint_1_global(idf, def)
case GLOBAL: case GLOBAL:
#ifdef IMPLICIT #ifdef IMPLICIT
case IMPLICIT: case IMPLICIT:
#endif IMPLICIT #endif /* IMPLICIT */
if (fund == ERRONEOUS) if (fund == ERRONEOUS)
break; break;
@ -1303,6 +1303,6 @@ print_lint_stack(msg)
print(" |--------------\n\n"); print(" |--------------\n\n");
} }
#endif DEBUG #endif /* DEBUG */
#endif LINT #endif /* LINT */

View file

@ -57,4 +57,4 @@ struct mlist {
#define K_UNDEF 10 #define K_UNDEF 10
#define K_PRAGMA 11 #define K_PRAGMA 11
#define K_FILE 100 /* for dependency generator */ #define K_FILE 100 /* for dependency generator */
#endif NOPP #endif /* NOPP */

View file

@ -47,7 +47,7 @@ extern char *dep_file;
static File *dep_fd = STDOUT; static File *dep_fd = STDOUT;
extern char *getwdir(); extern char *getwdir();
#endif NOPP #endif /* NOPP */
struct sp_id special_ids[] = { struct sp_id special_ids[] = {
{"setjmp", SP_SETJMP}, /* non-local goto's are registered */ {"setjmp", SP_SETJMP}, /* non-local goto's are registered */
@ -64,7 +64,7 @@ arith
#ifndef NOFLOAT #ifndef NOFLOAT
float_size = SZ_FLOAT, float_size = SZ_FLOAT,
double_size = SZ_DOUBLE, double_size = SZ_DOUBLE,
#endif NOFLOAT #endif /* NOFLOAT */
pointer_size = SZ_POINTER; pointer_size = SZ_POINTER;
int int
@ -75,15 +75,15 @@ int
#ifndef NOFLOAT #ifndef NOFLOAT
float_align = AL_FLOAT, float_align = AL_FLOAT,
double_align = AL_DOUBLE, double_align = AL_DOUBLE,
#endif NOFLOAT #endif /* NOFLOAT */
pointer_align = AL_POINTER, pointer_align = AL_POINTER,
struct_align = AL_STRUCT, struct_align = AL_STRUCT,
union_align = AL_UNION; union_align = AL_UNION;
#endif NOCROSS #endif /* NOCROSS */
#ifndef NOPP #ifndef NOPP
arith ifval; /* ifval will contain the result of the #if expression */ arith ifval; /* ifval will contain the result of the #if expression */
#endif NOPP #endif /* NOPP */
char *prog_name; char *prog_name;
@ -103,7 +103,7 @@ main(argc, argv)
inc_max = 10; inc_max = 10;
init_pp(); /* initialise the preprocessor macros */ init_pp(); /* initialise the preprocessor macros */
#endif NOPP #endif /* NOPP */
/* Note: source file "-" indicates that the source is supplied /* Note: source file "-" indicates that the source is supplied
as standard input. This is only allowed if INP_READ_IN_ONE is as standard input. This is only allowed if INP_READ_IN_ONE is
@ -111,9 +111,9 @@ main(argc, argv)
*/ */
#ifdef INP_READ_IN_ONE #ifdef INP_READ_IN_ONE
while (argc > 1 && *argv[1] == '-') while (argc > 1 && *argv[1] == '-')
#else INP_READ_IN_ONE #else /* INP_READ_IN_ONE */
while (argc > 1 && *argv[1] == '-' && argv[1][1] != '\0') while (argc > 1 && *argv[1] == '-' && argv[1][1] != '\0')
#endif INP_READ_IN_ONE #endif /* INP_READ_IN_ONE */
{ {
char *par = &argv[1][1]; char *par = &argv[1][1];
@ -122,12 +122,12 @@ main(argc, argv)
} }
#ifdef LINT #ifdef LINT
lint_init(); lint_init();
#endif LINT #endif /* LINT */
compile(argc - 1, &argv[1]); compile(argc - 1, &argv[1]);
#ifdef DEBUG #ifdef DEBUG
hash_stat(); hash_stat();
#endif DEBUG #endif /* DEBUG */
#ifndef NOPP #ifndef NOPP
if (do_dependencies) { if (do_dependencies) {
@ -201,7 +201,7 @@ char *s, *source;
else fprint(dep_fd, "%s\n", s); else fprint(dep_fd, "%s\n", s);
} }
#endif NOPP #endif /* NOPP */
char *source = 0; char *source = 0;
@ -213,12 +213,12 @@ compile(argc, argv)
char *result; char *result;
#ifndef LINT #ifndef LINT
register char *destination = 0; register char *destination = 0;
#endif LINT #endif /* LINT */
#ifdef DEBUG #ifdef DEBUG
#ifndef NOPP #ifndef NOPP
int pp_only = options['E'] || options['P'] || options['C']; int pp_only = options['E'] || options['P'] || options['C'];
#endif NOPP #endif /* NOPP */
#endif #endif
switch (argc) { switch (argc) {
@ -227,10 +227,10 @@ compile(argc, argv)
#ifdef DEBUG #ifdef DEBUG
#ifndef NOPP #ifndef NOPP
if (!pp_only) if (!pp_only)
#endif NOPP #endif /* NOPP */
#endif #endif
fatal("%s: destination file not specified", prog_name); fatal("%s: destination file not specified", prog_name);
#endif LINT #endif /* LINT */
break; break;
#ifndef LINT #ifndef LINT
@ -241,14 +241,14 @@ compile(argc, argv)
nmlist = argv[2]; nmlist = argv[2];
destination = argv[1]; destination = argv[1];
break; break;
#endif LINT #endif /* LINT */
default: default:
#ifndef LINT #ifndef LINT
fatal("use: %s source destination [namelist]", prog_name); fatal("use: %s source destination [namelist]", prog_name);
#else LINT #else /* LINT */
fatal("use: %s source", prog_name); fatal("use: %s source", prog_name);
#endif LINT #endif /* LINT */
break; break;
} }
@ -271,7 +271,7 @@ compile(argc, argv)
#endif #endif
#ifndef NOPP #ifndef NOPP
WorkingDir = getwdir(source); WorkingDir = getwdir(source);
#endif NOPP #endif /* NOPP */
PushLex(); /* initialize lex machine */ PushLex(); /* initialize lex machine */
#ifdef DEBUG #ifdef DEBUG
@ -279,20 +279,20 @@ compile(argc, argv)
if (pp_only) /* run the preprocessor as if it is stand-alone */ if (pp_only) /* run the preprocessor as if it is stand-alone */
preprocess(); preprocess();
else else
#endif NOPP #endif /* NOPP */
#endif DEBUG #endif /* DEBUG */
{ {
#ifndef LINT #ifndef LINT
/* compile the source text */ /* compile the source text */
C_program(); C_program();
#ifdef PREPEND_SCOPES #ifdef PREPEND_SCOPES
prepend_scopes(); prepend_scopes();
#endif PREPEND_SCOPES #endif /* PREPEND_SCOPES */
end_code(); end_code();
#else LINT #else /* LINT */
/* lint the source text */ /* lint the source text */
C_program(); C_program();
#endif LINT #endif /* LINT */
#ifdef DEBUG #ifdef DEBUG
if (options['u']) { if (options['u']) {
@ -300,7 +300,7 @@ compile(argc, argv)
} }
if (options['f'] || options['t']) if (options['f'] || options['t'])
dumpidftab("end of main", options['f'] ? 0 : 0); dumpidftab("end of main", options['f'] ? 0 : 0);
#endif DEBUG #endif /* DEBUG */
} }
PopLex(); PopLex();
} }
@ -338,7 +338,7 @@ init()
#ifndef NOFLOAT #ifndef NOFLOAT
float_type = standard_type(FLOAT, 0, float_align, float_size); float_type = standard_type(FLOAT, 0, float_align, float_size);
double_type = standard_type(DOUBLE, 0, double_align, double_size); double_type = standard_type(DOUBLE, 0, double_align, double_size);
#endif NOFLOAT #endif /* NOFLOAT */
void_type = standard_type(VOID, 0, 1, (arith)0); void_type = standard_type(VOID, 0, 1, (arith)0);
label_type = standard_type(LABEL, 0, 0, (arith)0); label_type = standard_type(LABEL, 0, 0, (arith)0);
error_type = standard_type(ERRONEOUS, 0, 1, (arith)1); error_type = standard_type(ERRONEOUS, 0, 1, (arith)1);
@ -377,7 +377,7 @@ init()
#ifndef NOFLOAT #ifndef NOFLOAT
add_def(str2idf("float"), TYPEDEF, float_type, L_UNIVERSAL); add_def(str2idf("float"), TYPEDEF, float_type, L_UNIVERSAL);
add_def(str2idf("double"), TYPEDEF, double_type, L_UNIVERSAL); add_def(str2idf("double"), TYPEDEF, double_type, L_UNIVERSAL);
#endif NOFLOAT #endif /* NOFLOAT */
add_def(str2idf("void"), TYPEDEF, void_type, L_UNIVERSAL); add_def(str2idf("void"), TYPEDEF, void_type, L_UNIVERSAL);
stack_level(); stack_level();
} }
@ -457,7 +457,7 @@ preprocess()
case FLOATING: case FLOATING:
print("%s ", dot.tk_fval); print("%s ", dot.tk_fval);
break; break;
#endif NOFLOAT #endif /* NOFLOAT */
case EOI: case EOI:
case EOF: case EOF:
return; return;
@ -466,8 +466,8 @@ preprocess()
} }
} }
} }
#endif NOPP #endif /* NOPP */
#endif DEBUG #endif /* DEBUG */
No_Mem() /* called by alloc package */ No_Mem() /* called by alloc package */
{ {

View file

@ -31,12 +31,12 @@ extern int inc_total;
int do_dependencies = 0; int do_dependencies = 0;
char *dep_file = 0; char *dep_file = 0;
#endif NOPP #endif /* NOPP */
char options[128]; /* one for every char */ char options[128]; /* one for every char */
#ifdef LINT #ifdef LINT
char loptions[128]; /* one for every char */ char loptions[128]; /* one for every char */
#endif LINT #endif /* LINT */
extern int idfsize; extern int idfsize;
extern int density; extern int density;
@ -57,9 +57,9 @@ next_option: /* to allow combined one-char options */
default: default:
#ifndef LINT #ifndef LINT
fatal("illegal option: %c", opt); fatal("illegal option: %c", opt);
#else LINT #else /* LINT */
warning("illegal option: %c", opt); warning("illegal option: %c", opt);
#endif LINT #endif /* LINT */
break; break;
case '-': case '-':
@ -69,14 +69,14 @@ next_option: /* to allow combined one-char options */
#ifndef LINT #ifndef LINT
#ifdef DATAFLOW #ifdef DATAFLOW
case 'd': case 'd':
#endif DATAFLOW #endif /* DATAFLOW */
case 'p': /* procentry/procexit */ case 'p': /* procentry/procexit */
case 'L' : /* no fil/lin */ case 'L' : /* no fil/lin */
case 'n': /* use no registers */ case 'n': /* use no registers */
case 'w': /* no warnings will be given */ case 'w': /* no warnings will be given */
options[opt] = 1; options[opt] = 1;
goto next_option; goto next_option;
#endif LINT #endif /* LINT */
#ifdef LINT #ifdef LINT
case 'h': /* heuristic tests */ case 'h': /* heuristic tests */
@ -88,7 +88,7 @@ next_option: /* to allow combined one-char options */
case 'L': /* lintlibrary */ case 'L': /* lintlibrary */
loptions[opt] = 1; loptions[opt] = 1;
goto next_option; goto next_option;
#endif LINT #endif /* LINT */
#ifndef LINT #ifndef LINT
#ifndef NOPP #ifndef NOPP
@ -102,8 +102,8 @@ next_option: /* to allow combined one-char options */
case 'm': case 'm':
options[opt] = 1; options[opt] = 1;
break; break;
#endif NOPP #endif /* NOPP */
#endif LINT #endif /* LINT */
#ifdef DBSYMTAB #ifdef DBSYMTAB
case 'g': /* symbol table for debugger */ case 'g': /* symbol table for debugger */
options['g'] = 1; options['g'] = 1;
@ -114,9 +114,9 @@ next_option: /* to allow combined one-char options */
case 'R': /* strict version */ case 'R': /* strict version */
#ifndef NOROPTION #ifndef NOROPTION
options[opt] = 1; options[opt] = 1;
#else NOROPTION #else /* NOROPTION */
warning("-R option not implemented"); warning("-R option not implemented");
#endif NOROPTION #endif /* NOROPTION */
goto next_option; goto next_option;
#ifdef ___XXX___ #ifdef ___XXX___
@ -125,11 +125,11 @@ deleted, is now a debug-flag
#ifndef NOPP #ifndef NOPP
options['E'] = 1; options['E'] = 1;
warning("-C: comment is not output"); warning("-C: comment is not output");
#else NOPP #else /* NOPP */
warning("-C option ignored"); warning("-C option ignored");
#endif NOPP #endif /* NOPP */
break; break;
#endif ___XXX___ #endif /* ___XXX___ */
case 'D' : { /* -Dname : predefine name */ case 'D' : { /* -Dname : predefine name */
#ifndef NOPP #ifndef NOPP
@ -161,9 +161,9 @@ deleted, is now a debug-flag
macro_def(str2idf(name), mactext, -1, strlen(mactext), macro_def(str2idf(name), mactext, -1, strlen(mactext),
NOFLAG); NOFLAG);
#else NOPP #else /* NOPP */
warning("-D option ignored"); warning("-D option ignored");
#endif NOPP #endif /* NOPP */
break; break;
} }
@ -172,11 +172,11 @@ deleted, is now a debug-flag
case 'E' : /* run preprocessor only, with #<int> */ case 'E' : /* run preprocessor only, with #<int> */
#ifndef NOPP #ifndef NOPP
options['E'] = 1; options['E'] = 1;
#else NOPP #else /* NOPP */
warning("-E option ignored"); warning("-E option ignored");
#endif NOPP #endif /* NOPP */
break; break;
#endif ___XXX___ #endif /* ___XXX___ */
case 'I' : /* -Ipath : insert "path" into include list */ case 'I' : /* -Ipath : insert "path" into include list */
#ifndef NOPP #ifndef NOPP
@ -197,9 +197,9 @@ deleted, is now a debug-flag
} }
} }
else inctable[inc_pos] = 0; else inctable[inc_pos] = 0;
#else NOPP #else /* NOPP */
warning("-I option ignored"); warning("-I option ignored");
#endif NOPP #endif /* NOPP */
break; break;
case 'M': /* maximum identifier length */ case 'M': /* maximum identifier length */
@ -216,11 +216,11 @@ deleted, is now a debug-flag
#ifndef NOPP #ifndef NOPP
options['E'] = 1; options['E'] = 1;
options['P'] = 1; options['P'] = 1;
#else NOPP #else /* NOPP */
warning("-P option ignored"); warning("-P option ignored");
#endif NOPP #endif /* NOPP */
break; break;
#endif ___XXX___ #endif /* ___XXX___ */
#ifdef LINT #ifdef LINT
case 'S' : { /* -Sint : static scope number for lint */ case 'S' : { /* -Sint : static scope number for lint */
@ -228,7 +228,7 @@ deleted, is now a debug-flag
stat_number = txt2int(&text); stat_number = txt2int(&text);
break; break;
} }
#endif LINT #endif /* LINT */
case 'T' : { case 'T' : {
#ifdef USE_TMP #ifdef USE_TMP
@ -237,9 +237,9 @@ deleted, is now a debug-flag
C_tmpdir = text; C_tmpdir = text;
else else
C_tmpdir = "."; C_tmpdir = ".";
#else USE_TMP #else /* USE_TMP */
warning("-T option ignored"); warning("-T option ignored");
#endif USE_TMP #endif /* USE_TMP */
break; break;
} }
@ -253,9 +253,9 @@ deleted, is now a debug-flag
idef->id_macro = (struct macro *) 0; idef->id_macro = (struct macro *) 0;
} }
} }
#else NOPP #else /* NOPP */
warning("-U option ignored"); warning("-U option ignored");
#endif NOPP #endif /* NOPP */
break; break;
} }
@ -264,7 +264,7 @@ deleted, is now a debug-flag
#ifdef NOCROSS #ifdef NOCROSS
warning("-V option ignored"); warning("-V option ignored");
break; break;
#else NOCROSS #else /* NOCROSS */
{ {
register arith sz, algn; register arith sz, algn;
char c; char c;
@ -307,7 +307,7 @@ deleted, is now a debug-flag
float_size = sz; float_size = sz;
if (algn != 0) if (algn != 0)
float_align = algn; float_align = algn;
#endif NOFLOAT #endif /* NOFLOAT */
break; break;
case 'd': /* double */ case 'd': /* double */
#ifndef NOFLOAT #ifndef NOFLOAT
@ -315,7 +315,7 @@ deleted, is now a debug-flag
double_size = sz; double_size = sz;
if (algn != 0) if (algn != 0)
double_align = algn; double_align = algn;
#endif NOFLOAT #endif /* NOFLOAT */
break; break;
case 'p': /* pointer */ case 'p': /* pointer */
if (sz != (arith)0) if (sz != (arith)0)
@ -326,9 +326,9 @@ deleted, is now a debug-flag
case 'r': /* adjust bitfields right */ case 'r': /* adjust bitfields right */
#ifndef NOBITFIELD #ifndef NOBITFIELD
options['r'] = 1; options['r'] = 1;
#else NOBITFIELD #else /* NOBITFIELD */
warning("bitfields are not implemented"); warning("bitfields are not implemented");
#endif NOBITFIELD #endif /* NOBITFIELD */
break; break;
case 'S': /* initial struct alignment */ case 'S': /* initial struct alignment */
if (sz != (arith)0) if (sz != (arith)0)
@ -344,11 +344,11 @@ deleted, is now a debug-flag
} }
break; break;
} }
#endif NOCROSS #endif /* NOCROSS */
case 'S': case 'S':
density = txt2int(&text); density = txt2int(&text);
break; break;
#endif LINT #endif /* LINT */
} }
} }

View file

@ -59,11 +59,11 @@
#include "def.h" #include "def.h"
#ifdef LINT #ifdef LINT
#include "l_lint.h" #include "l_lint.h"
#endif LINT #endif /* LINT */
#ifndef NOPP #ifndef NOPP
extern arith ifval; extern arith ifval;
#endif NOPP #endif /* NOPP */
extern error(); extern error();
} }
@ -82,7 +82,7 @@ control_if_expression
"sizeof not allowed in preprocessor"); "sizeof not allowed in preprocessor");
ifval = expr->VL_VALUE; ifval = expr->VL_VALUE;
free_expression(expr); free_expression(expr);
#endif NOPP #endif /* NOPP */
} }
; ;
@ -128,7 +128,7 @@ external_definition
declare_idf(&Ds, &Dc, level); declare_idf(&Ds, &Dc, level);
#ifdef LINT #ifdef LINT
lint_ext_def(Dc.dc_idf, Ds.ds_sc); lint_ext_def(Dc.dc_idf, Ds.ds_sc);
#endif LINT #endif /* LINT */
} }
[ [
function(&Ds, &Dc) function(&Ds, &Dc)
@ -162,7 +162,7 @@ non_function(register struct decspecs *ds; register struct declarator *dc;)
{ {
#ifdef LINT #ifdef LINT
lint_non_function_decl(ds, dc); lint_non_function_decl(ds, dc);
#endif LINT #endif /* LINT */
} }
[ [
',' ','
@ -180,7 +180,7 @@ function(struct decspecs *ds; struct declarator *dc;)
{ register struct idf *idf = dc->dc_idf; { register struct idf *idf = dc->dc_idf;
#ifdef LINT #ifdef LINT
lint_start_function(); lint_start_function();
#endif LINT #endif /* LINT */
init_idf(idf); init_idf(idf);
stack_level(); /* L_FORMAL1 declarations */ stack_level(); /* L_FORMAL1 declarations */
declare_params(dc); declare_params(dc);
@ -192,21 +192,21 @@ function(struct decspecs *ds; struct declarator *dc;)
declare_formals(&fbytes); declare_formals(&fbytes);
#ifdef LINT #ifdef LINT
lint_formals(); lint_formals();
#endif LINT #endif /* LINT */
} }
compound_statement compound_statement
{ {
end_proc(fbytes); end_proc(fbytes);
#ifdef LINT #ifdef LINT
lint_implicit_return(); lint_implicit_return();
#endif LINT #endif /* LINT */
unstack_level(); /* L_FORMAL2 declarations */ unstack_level(); /* L_FORMAL2 declarations */
#ifdef LINT #ifdef LINT
lint_end_formals(); lint_end_formals();
#endif LINT #endif /* LINT */
unstack_level(); /* L_FORMAL1 declarations */ unstack_level(); /* L_FORMAL1 declarations */
#ifdef LINT #ifdef LINT
lint_end_function(); lint_end_function();
#endif LINT #endif /* LINT */
} }
; ;

View file

@ -235,4 +235,4 @@ EnableMacros()
} }
Unstacked = 0; Unstacked = 0;
} }
#endif NOPP #endif /* NOPP */

View file

@ -121,7 +121,7 @@ copyact(ch1, ch2, lvl)
case ']': case ']':
lexerror("unbalanced parenthesis"); lexerror("unbalanced parenthesis");
break; break;
#endif __MATCHING_PAR__ #endif /* __MATCHING_PAR__ */
case '(': case '(':
copyact('(', ')', lvl+1); copyact('(', ')', lvl+1);
@ -139,7 +139,7 @@ copyact(ch1, ch2, lvl)
case '[': case '[':
copyact('[', ']', lvl+1); copyact('[', ']', lvl+1);
break; break;
#endif __MATCHING_PAR__ #endif /* __MATCHING_PAR__ */
case '\n': case '\n':
LineNumber++; LineNumber++;
@ -234,4 +234,4 @@ copyact(ch1, ch2, lvl)
} }
} }
} }
#endif NOPP #endif /* NOPP */

View file

@ -14,9 +14,9 @@ extern arith
short_size, word_size, dword_size, int_size, long_size, short_size, word_size, dword_size, int_size, long_size,
#ifndef NOFLOAT #ifndef NOFLOAT
float_size, double_size, float_size, double_size,
#endif NOFLOAT #endif /* NOFLOAT */
pointer_size; pointer_size;
#else NOCROSS #else /* NOCROSS */
#define short_size (SZ_SHORT) #define short_size (SZ_SHORT)
#define word_size (SZ_WORD) #define word_size (SZ_WORD)
#define dword_size (2*SZ_WORD) #define dword_size (2*SZ_WORD)
@ -25,8 +25,8 @@ extern arith
#ifndef NOFLOAT #ifndef NOFLOAT
#define float_size (SZ_FLOAT) #define float_size (SZ_FLOAT)
#define double_size (SZ_DOUBLE) #define double_size (SZ_DOUBLE)
#endif NOFLOAT #endif /* NOFLOAT */
#define pointer_size (SZ_POINTER) #define pointer_size (SZ_POINTER)
#endif NOCROSS #endif /* NOCROSS */
extern arith max_int, max_unsigned; /* cstoper.c */ extern arith max_int, max_unsigned; /* cstoper.c */

View file

@ -56,7 +56,7 @@ skipspaces(ch, skipnl)
return ch; return ch;
} }
} }
#endif NOPP #endif /* NOPP */
PRIVATE PRIVATE
skipline() skipline()

View file

@ -12,7 +12,7 @@
#include <em.h> #include <em.h>
#else #else
#include "l_em.h" #include "l_em.h"
#endif LINT #endif /* LINT */
#include "debug.h" #include "debug.h"
#include "botch_free.h" #include "botch_free.h"
#include <alloc.h> #include <alloc.h>
@ -56,7 +56,7 @@ stack_level() {
local_level = stl; local_level = stl;
#ifdef LINT #ifdef LINT
lint_start_local(); lint_start_local();
#endif LINT #endif /* LINT */
} }
stack_idf(idf, stl) stack_idf(idf, stl)
@ -100,11 +100,11 @@ unstack_level()
#ifdef DEBUG #ifdef DEBUG
if (options['t']) if (options['t'])
dumpidftab("before unstackidfs", 0); dumpidftab("before unstackidfs", 0);
#endif DEBUG #endif /* DEBUG */
#ifdef LINT #ifdef LINT
lint_end_local(local_level); lint_end_local(local_level);
#endif LINT #endif /* LINT */
/* The implementation below is more careful than strictly /* The implementation below is more careful than strictly
necessary. Optimists may optimize it afterwards. necessary. Optimists may optimize it afterwards.
@ -164,7 +164,7 @@ unstack_level()
#ifdef DEBUG #ifdef DEBUG
if (options['t']) if (options['t'])
dumpidftab("after unstackidfs", 0); dumpidftab("after unstackidfs", 0);
#endif DEBUG #endif /* DEBUG */
} }
unstack_world() unstack_world()
@ -180,7 +180,7 @@ unstack_world()
#ifdef LINT #ifdef LINT
lint_end_global(local_level); lint_end_global(local_level);
#endif LINT #endif /* LINT */
open_name_list(); open_name_list();
@ -208,7 +208,7 @@ unstack_world()
def->df_initialized ? "init" : "no init", def->df_initialized ? "init" : "no init",
def->df_used ? "used" : "not used"); def->df_used ? "used" : "not used");
} }
#endif DEBUG #endif /* DEBUG */
/* /*
/_* find final storage class *_/ /_* find final storage class *_/
if (def->df_sc == GLOBAL || def->df_sc == IMPLICIT) if (def->df_sc == GLOBAL || def->df_sc == IMPLICIT)

View file

@ -12,7 +12,7 @@
#else #else
#include "l_em.h" #include "l_em.h"
#include "l_lint.h" #include "l_lint.h"
#endif LINT #endif /* LINT */
#include "debug.h" #include "debug.h"
#include "botch_free.h" #include "botch_free.h"
@ -45,7 +45,7 @@ statement
{ {
#ifdef LINT #ifdef LINT
lint_statement(); lint_statement();
#endif LINT #endif /* LINT */
} }
: :
%if (AHEAD != ':') %if (AHEAD != ':')
@ -74,7 +74,7 @@ statement
code_break(); code_break();
#ifdef LINT #ifdef LINT
lint_break_stmt(); lint_break_stmt();
#endif LINT #endif /* LINT */
} }
';' ';'
| |
@ -83,7 +83,7 @@ statement
code_continue(); code_continue();
#ifdef LINT #ifdef LINT
lint_continue_stmt(); lint_continue_stmt();
#endif LINT #endif /* LINT */
} }
';' ';'
| |
@ -106,7 +106,7 @@ expression_statement
{ {
#ifdef DEBUG #ifdef DEBUG
print_expr("expression_statement", expr); print_expr("expression_statement", expr);
#endif DEBUG #endif /* DEBUG */
code_expr(expr, RVAL, FALSE, NO_LABEL, NO_LABEL); code_expr(expr, RVAL, FALSE, NO_LABEL, NO_LABEL);
free_expression(expr); free_expression(expr);
} }
@ -127,7 +127,7 @@ label
*/ */
#ifdef LINT #ifdef LINT
lint_label(); lint_label();
#endif LINT #endif /* LINT */
define_label(idf); define_label(idf);
C_df_ilb((label)idf->id_def->df_address); C_df_ilb((label)idf->id_def->df_address);
} }
@ -156,14 +156,14 @@ if_statement
/* else fall through */ /* else fall through */
#ifdef LINT #ifdef LINT
start_if_part(1); start_if_part(1);
#endif LINT #endif /* LINT */
} }
else { else {
code_expr(expr, RVAL, TRUE, l_true, l_false); code_expr(expr, RVAL, TRUE, l_true, l_false);
C_df_ilb(l_true); C_df_ilb(l_true);
#ifdef LINT #ifdef LINT
start_if_part(0); start_if_part(0);
#endif LINT #endif /* LINT */
} }
free_expression(expr); free_expression(expr);
} }
@ -174,7 +174,7 @@ if_statement
{ {
#ifdef LINT #ifdef LINT
start_else_part(); start_else_part();
#endif LINT #endif /* LINT */
C_bra(l_end); C_bra(l_end);
C_df_ilb(l_false); C_df_ilb(l_false);
} }
@ -182,14 +182,14 @@ if_statement
{ C_df_ilb(l_end); { C_df_ilb(l_end);
#ifdef LINT #ifdef LINT
end_if_else_stmt(); end_if_else_stmt();
#endif LINT #endif /* LINT */
} }
| |
empty empty
{ C_df_ilb(l_false); { C_df_ilb(l_false);
#ifdef LINT #ifdef LINT
end_if_stmt(); end_if_stmt();
#endif LINT #endif /* LINT */
} }
] ]
; ;
@ -223,7 +223,7 @@ while_statement
#ifdef LINT #ifdef LINT
start_while_stmt(expr); start_while_stmt(expr);
#endif LINT #endif /* LINT */
} }
')' ')'
@ -236,7 +236,7 @@ while_statement
#ifdef LINT #ifdef LINT
end_loop_body(); end_loop_body();
end_loop_stmt(); end_loop_stmt();
#endif LINT #endif /* LINT */
} }
; ;
@ -252,7 +252,7 @@ do_statement
stack_stmt(l_break, l_continue); stack_stmt(l_break, l_continue);
#ifdef LINT #ifdef LINT
start_do_stmt(); start_do_stmt();
#endif LINT #endif /* LINT */
} }
statement statement
WHILE WHILE
@ -260,7 +260,7 @@ do_statement
{ {
#ifdef LINT #ifdef LINT
end_loop_body(); end_loop_body();
#endif LINT #endif /* LINT */
C_df_ilb(l_continue); C_df_ilb(l_continue);
} }
expression(&expr) expression(&expr)
@ -272,13 +272,13 @@ do_statement
} }
#ifdef LINT #ifdef LINT
end_do_stmt(1, expr->VL_VALUE != (arith)0); end_do_stmt(1, expr->VL_VALUE != (arith)0);
#endif LINT #endif /* LINT */
} }
else { else {
code_expr(expr, RVAL, TRUE, l_body, l_break); code_expr(expr, RVAL, TRUE, l_body, l_break);
#ifdef LINT #ifdef LINT
end_do_stmt(0, 0); end_do_stmt(0, 0);
#endif LINT #endif /* LINT */
} }
C_df_ilb(l_break); C_df_ilb(l_break);
} }
@ -331,13 +331,13 @@ for_statement
{ {
#ifdef LINT #ifdef LINT
start_for_stmt(e_test); start_for_stmt(e_test);
#endif LINT #endif /* LINT */
} }
statement statement
{ {
#ifdef LINT #ifdef LINT
end_loop_body(); end_loop_body();
#endif LINT #endif /* LINT */
C_df_ilb(l_continue); C_df_ilb(l_continue);
if (e_incr) if (e_incr)
code_expr(e_incr, RVAL, FALSE, code_expr(e_incr, RVAL, FALSE,
@ -350,7 +350,7 @@ for_statement
free_expression(e_incr); free_expression(e_incr);
#ifdef LINT #ifdef LINT
end_loop_stmt(); end_loop_stmt();
#endif LINT #endif /* LINT */
} }
; ;
@ -366,14 +366,14 @@ switch_statement
code_startswitch(&expr); code_startswitch(&expr);
#ifdef LINT #ifdef LINT
start_switch_part(is_cp_cst(expr)); start_switch_part(is_cp_cst(expr));
#endif LINT #endif /* LINT */
} }
')' ')'
statement statement
{ {
#ifdef LINT #ifdef LINT
end_switch_stmt(); end_switch_stmt();
#endif LINT #endif /* LINT */
code_endswitch(); code_endswitch();
free_expression(expr); free_expression(expr);
} }
@ -389,7 +389,7 @@ case_statement
{ {
#ifdef LINT #ifdef LINT
lint_case_stmt(0); lint_case_stmt(0);
#endif LINT #endif /* LINT */
code_case(expr); code_case(expr);
free_expression(expr); free_expression(expr);
} }
@ -403,7 +403,7 @@ default_statement
{ {
#ifdef LINT #ifdef LINT
lint_case_stmt(1); lint_case_stmt(1);
#endif LINT #endif /* LINT */
code_default(); code_default();
} }
':' ':'
@ -420,13 +420,13 @@ return_statement
{ {
#ifdef LINT #ifdef LINT
lint_ret_conv(expr); lint_ret_conv(expr);
#endif LINT #endif /* LINT */
do_return_expr(expr); do_return_expr(expr);
free_expression(expr); free_expression(expr);
#ifdef LINT #ifdef LINT
lint_return_stmt(VALRETURNED); lint_return_stmt(VALRETURNED);
#endif LINT #endif /* LINT */
} }
| |
empty empty
@ -434,7 +434,7 @@ return_statement
do_return(); do_return();
#ifdef LINT #ifdef LINT
lint_return_stmt(NOVALRETURNED); lint_return_stmt(NOVALRETURNED);
#endif LINT #endif /* LINT */
} }
] ]
';' ';'
@ -452,7 +452,7 @@ jump
C_bra((label)idf->id_def->df_address); C_bra((label)idf->id_def->df_address);
#ifdef LINT #ifdef LINT
lint_jump_stmt(idf); lint_jump_stmt(idf);
#endif LINT #endif /* LINT */
} }
; ;

View file

@ -70,7 +70,7 @@ add_sel(stp, tp, idf, sdefpp, szp, fd) /* this is horrible */
arith offset; arith offset;
#ifndef NOBITFIELD #ifndef NOBITFIELD
extern arith add_field(); extern arith add_field();
#endif NOBITFIELD #endif /* NOBITFIELD */
struct tag *tg = stp->tp_idf->id_struct; /* or union */ struct tag *tg = stp->tp_idf->id_struct; /* or union */
struct sdef *sdef = idf->id_sdef; struct sdef *sdef = idf->id_sdef;
@ -98,10 +98,10 @@ add_sel(stp, tp, idf, sdefpp, szp, fd) /* this is horrible */
*/ */
offset = add_field(szp, fd, &tp, idf, stp); offset = add_field(szp, fd, &tp, idf, stp);
} }
#else NOBITFIELD #else /* NOBITFIELD */
offset = align(*szp, tp->tp_align); offset = align(*szp, tp->tp_align);
field_busy = 0; field_busy = 0;
#endif NOBITFIELD #endif /* NOBITFIELD */
} }
else { /* (stp->tp_fund == UNION) */ else { /* (stp->tp_fund == UNION) */
if (fd) { if (fd) {
@ -139,7 +139,7 @@ add_sel(stp, tp, idf, sdefpp, szp, fd) /* this is horrible */
#ifndef NOBITFIELD #ifndef NOBITFIELD
if (tp->tp_fund == FIELD) if (tp->tp_fund == FIELD)
tp->tp_field->fd_sdef = newsdef; tp->tp_field->fd_sdef = newsdef;
#endif NOBITFIELD #endif /* NOBITFIELD */
stack_idf(idf, stack_level_of(lvl)); stack_idf(idf, stack_level_of(lvl));
@ -466,7 +466,7 @@ add_field(szp, fd, fdtpp, idf, stp)
return field_offset; return field_offset;
} }
#endif NOBITFIELD #endif /* NOBITFIELD */
/* some utilities */ /* some utilities */
int int

View file

@ -11,7 +11,7 @@
#include <em.h> #include <em.h>
#else #else
#include "l_em.h" #include "l_em.h"
#endif LINT #endif /* LINT */
#include "debug.h" #include "debug.h"
#include "botch_free.h" #include "botch_free.h"
#include <alloc.h> #include <alloc.h>
@ -75,7 +75,7 @@ code_startswitch(expp)
error("float/double in switch"); error("float/double in switch");
erroneous2int(expp); erroneous2int(expp);
break; break;
#endif NOFLOAT #endif /* NOFLOAT */
} }
stack_stmt(l_break, NO_LABEL); stack_stmt(l_break, NO_LABEL);
sh->sh_break = l_break; sh->sh_break = l_break;

View file

@ -32,7 +32,7 @@ struct tokenname tkspec[] = { /* the names of the special tokens */
{FLOATING, "floating"}, {FLOATING, "floating"},
{0, ""} {0, ""}
}; };
#endif ____ #endif /* ____ */
#ifdef ____ #ifdef ____
struct tokenname tkcomp[] = { /* names of the composite tokens */ struct tokenname tkcomp[] = { /* names of the composite tokens */
@ -49,7 +49,7 @@ struct tokenname tkcomp[] = { /* names of the composite tokens */
{OR, "||"}, {OR, "||"},
{0, ""} {0, ""}
}; };
#endif ____ #endif /* ____ */
struct tokenname tkidf[] = { /* names of the identifier tokens */ struct tokenname tkidf[] = { /* names of the identifier tokens */
{ASM, "asm"}, {ASM, "asm"},
@ -128,7 +128,7 @@ struct tokenname tkfunny[] = { /* internal keywords */
{FLOAT2FLOAT, "float2float"}, {FLOAT2FLOAT, "float2float"},
{0, ""} {0, ""}
}; };
#endif ____ #endif /* ____ */
reserve(resv) reserve(resv)
register struct tokenname resv[]; register struct tokenname resv[];

View file

@ -20,7 +20,7 @@
struct type *function_of(), *array_of(); struct type *function_of(), *array_of();
#ifndef NOBITFIELD #ifndef NOBITFIELD
struct type *field_of(); struct type *field_of();
#endif NOBITFIELD #endif /* NOBITFIELD */
/* To be created dynamically in main() from defaults or from command /* To be created dynamically in main() from defaults or from command
line parameters. line parameters.
@ -33,7 +33,7 @@ struct type
*long_type, *ulong_type, *long_type, *ulong_type,
#ifndef NOFLOAT #ifndef NOFLOAT
*float_type, *double_type, *float_type, *double_type,
#endif NOFLOAT #endif /* NOFLOAT */
*void_type, *label_type, *void_type, *label_type,
*string_type, *funint_type, *error_type; *string_type, *funint_type, *error_type;
@ -69,7 +69,7 @@ construct_type(fund, tp, count)
case FIELD: case FIELD:
dtp = field_of(tp); dtp = field_of(tp);
break; break;
#endif NOBITFIELD #endif /* NOBITFIELD */
case FUNCTION: case FUNCTION:
if (tp->tp_fund == FUNCTION) { if (tp->tp_fund == FUNCTION) {
@ -169,7 +169,7 @@ field_of(tp)
dtp->tp_size = tp->tp_size; dtp->tp_size = tp->tp_size;
return dtp; return dtp;
} }
#endif NOBITFIELD #endif /* NOBITFIELD */
arith arith
size_of_type(tp, nm) size_of_type(tp, nm)

View file

@ -34,7 +34,7 @@ extern struct type
#ifndef NOBITFIELD #ifndef NOBITFIELD
extern struct type *field_of(); extern struct type *field_of();
#endif NOBITFIELD #endif /* NOBITFIELD */
extern struct type extern struct type
*char_type, *uchar_type, *char_type, *uchar_type,
@ -44,7 +44,7 @@ extern struct type
*long_type, *ulong_type, *long_type, *ulong_type,
#ifndef NOFLOAT #ifndef NOFLOAT
*float_type, *double_type, *float_type, *double_type,
#endif NOFLOAT #endif /* NOFLOAT */
*void_type, *label_type, *void_type, *label_type,
*string_type, *funint_type, *error_type; *string_type, *funint_type, *error_type;

View file

@ -16,7 +16,7 @@
#include <em.h> #include <em.h>
#else #else
#include "l_em.h" #include "l_em.h"
#endif LINT #endif /* LINT */
#include <em_arith.h> #include <em_arith.h>
#include <em_reg.h> #include <em_reg.h>
#include <alloc.h> #include <alloc.h>
@ -34,7 +34,7 @@
static struct localvar *FreeTmps; static struct localvar *FreeTmps;
#ifdef USE_TMP #ifdef USE_TMP
static int loc_id; static int loc_id;
#endif USE_TMP #endif /* USE_TMP */
#ifdef PEEPHOLE #ifdef PEEPHOLE
#undef REGCOUNT #undef REGCOUNT
@ -47,7 +47,7 @@ LocalInit()
{ {
#ifdef USE_TMP #ifdef USE_TMP
C_insertpart(loc_id = C_getid()); C_insertpart(loc_id = C_getid());
#endif USE_TMP #endif /* USE_TMP */
} }
arith arith
@ -239,4 +239,4 @@ AddrLocal(off)
if (p) p->t_regtype = -1; if (p) p->t_regtype = -1;
C_lal(off); C_lal(off);
} }
#endif LINT #endif /* LINT */

View file

@ -69,4 +69,4 @@ struct tokenname tkfunny[] = { /* internal keywords */
{ERRONEOUS, "erroneous"}, {ERRONEOUS, "erroneous"},
{0, ""} {0, ""}
}; };
#endif ____ #endif /* ____ */