some cosmetic changes to fix warnings and forLoop

This commit is contained in:
Samuel D. Crow
2021-05-04 12:15:49 -05:00
parent e8a47bd3da
commit bf70fd087b
8 changed files with 102 additions and 50 deletions

View File

@@ -1,9 +1,9 @@
CC := g++
CFLAGS := -Wall
CFLAGS += -std=c++11
CFLAGS += -fno-rtti
CFLAGS += -fno-exceptions
CFLAGS += -Os
#CFLAGS += -fno-rtti
#CFLAGS += -fno-exceptions
#CFLAGS += -Os
LFLAGS :=
all: binaries

View File

@@ -5,7 +5,7 @@
*/
#include "runtime.h"
struct subroutine *callStack=nullptr;
subroutine *callStack=nullptr;
subroutine::subroutine(unsigned int r)
{
@@ -17,7 +17,7 @@ unsigned int subroutine::close()
{
if (callStack==nullptr) return STACK_UNDERFLOW_ERROR;
unsigned int r=callStack->ret;
struct subroutine *l=callStack->called;
subroutine *l=callStack->called;
delete callStack;
callStack=l;
return r;

View File

@@ -20,7 +20,7 @@ enum STATES:unsigned int
class subroutine
{
struct subroutine *called;
subroutine *called;
unsigned int ret;
public:
@@ -30,7 +30,7 @@ public:
{}
};
extern struct subroutine *callStack;
extern subroutine *callStack;
/* function prototype */
unsigned int run();