From f0a6653bd1694efb44339a6fab4c6cfe9aca9aba Mon Sep 17 00:00:00 2001 From: uz Date: Sun, 5 Jun 2011 14:47:28 +0000 Subject: [PATCH] Added a comment about the fix explaining why the given order of calls is necessary. git-svn-id: svn://svn.cc65.org/cc65/trunk@5035 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/ca65/macro.c | 5 ++++- src/ca65/make/gcc.mak | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) 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 -- 2.39.5