Skip to content

Commit

Permalink
Travis tests pass only with pre C99 code
Browse files Browse the repository at this point in the history
  • Loading branch information
markuspf committed Feb 26, 2017
1 parent 8c16dc4 commit 8a1dcb4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/syntaxtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
**
** TODO:
** - Expressions vs Statements
** - Documentation
** - Compiler functions per argument (will make more separate functions go away)
*/
#include "system.h"
#include <stdarg.h>
Expand Down Expand Up @@ -86,6 +88,7 @@ static Obj SyntaxTreeCompiler(Expr expr)

static Obj SyntaxTreeDefaultCompiler(Obj result, Expr expr)
{
int i;
UInt tnum;
CompilerT comp;

Expand All @@ -101,7 +104,7 @@ static Obj SyntaxTreeDefaultCompiler(Obj result, Expr expr)
// error
}

for (int i = 0; i < comp.arity; i++) {
for (i = 0; i < comp.arity; i++) {
AssPRec(result, RNamName(comp.argnames[i]),
SyntaxTreeCompiler(ADDR_EXPR(expr)[i]));
}
Expand Down Expand Up @@ -1027,19 +1030,21 @@ static StructGVarFunc GVarFuncs[] = { { "SYNTAX_TREE", 1, "func",

static Int InitKernel(StructInitInfo * module)
{
UInt i;

/* init filters and functions */
InitHdlrFuncsFromTable(GVarFuncs);

/* TODO: Needed? Cleaner? Remove? */
/* check TNUMS table */
for (UInt i = 0; i < LAST_STAT_TNUM; i++) {
for (i = 0; i < LAST_STAT_TNUM; i++) {
if (!(StatCompilers[i].tnum == i)) {
fprintf(stderr, "Warning, statement tnum desync %jd %jd %s\n",
StatCompilers[i].tnum, i, StatCompilers[i].name);
}
}

for (UInt i = FIRST_EXPR_TNUM; i < LAST_EXPR_TNUM; i++) {
for (i = FIRST_EXPR_TNUM; i < LAST_EXPR_TNUM; i++) {
if (!(ExprCompilers[i - FIRST_EXPR_TNUM].tnum == i)) {
fprintf(stderr, "Warning, expression tnum desync %jd %jd %s\n",
ExprCompilers[i - FIRST_EXPR_TNUM].tnum, i,
Expand Down

0 comments on commit 8a1dcb4

Please sign in to comment.