diff --git a/src/ca65/macro.c b/src/ca65/macro.c index 4babea30f..ddf88b994 100644 --- a/src/ca65/macro.c +++ b/src/ca65/macro.c @@ -677,7 +677,10 @@ static void StartExpClassic (Macro* M) token_t Term; - /* Create a structure holding expansion data */ + /* Create a structure holding expansion data. This must be done before + * skipping the macro name, because the call to NextTok may cause a new + * expansion if the next token is actually a .define style macro. + */ E = NewMacExp (M); /* Skip the macro name */ diff --git a/src/ca65/make/gcc.mak b/src/ca65/make/gcc.mak index 788ba8cd8..b82923baf 100644 --- a/src/ca65/make/gcc.mak +++ b/src/ca65/make/gcc.mak @@ -15,7 +15,7 @@ CA65_INC = \"/usr/lib/cc65/asminc/\" # CC = gcc -CFLAGS = -g -Wall -W -std=c89 +CFLAGS = -g -O2 -Wall -W -std=c89 override CFLAGS += -I$(COMMON) override CFLAGS += -DCA65_INC=$(CA65_INC) EBIND = emxbind