From 46f1285208bb25b8bd226f884378e64aeb286c69 Mon Sep 17 00:00:00 2001 From: uz Date: Sun, 5 Jun 2011 14:45:37 +0000 Subject: [PATCH] Fixed an error in macro expansion: If the first token after the macro name was a .define style macro, the assembler run into an internal error, because the expansion of the second macro was started before the first one git-svn-id: svn://svn.cc65.org/cc65/trunk@5034 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/ca65/macro.c | 6 +++--- src/ca65/make/gcc.mak | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ca65/macro.c b/src/ca65/macro.c index 68c200c5e..4babea30f 100644 --- a/src/ca65/macro.c +++ b/src/ca65/macro.c @@ -677,12 +677,12 @@ static void StartExpClassic (Macro* M) token_t Term; - /* Skip the macro name */ - NextTok (); - /* Create a structure holding expansion data */ E = NewMacExp (M); + /* Skip the macro name */ + NextTok (); + /* Read the actual parameters */ while (!TokIsSep (CurTok.Tok)) { diff --git a/src/ca65/make/gcc.mak b/src/ca65/make/gcc.mak index b82923baf..788ba8cd8 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 -O2 -Wall -W -std=c89 +CFLAGS = -g -Wall -W -std=c89 override CFLAGS += -I$(COMMON) override CFLAGS += -DCA65_INC=$(CA65_INC) EBIND = emxbind