some cosmetic changes to fix warnings and forLoop
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user