Re: [cc65] Multi-line macro bug

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2001-06-24 17:45:39


Hi!

On Sat, Jun 23, 2001 at 06:43:40PM +0200, Adam Dunkels wrote:
> There seems to be a bug concerning multi-line macros in the C preprocessor in
> cc65 version 2.6.1 and the latest snapshot. When trying to compile the
> following program:
[...]
> Is this a known bug? Are there any fixes?

It's a bug, thanks for the report! Here is the patch:

-----------------------------------------------------------------------------
Index: scanner.c
===================================================================
RCS file: /usr/local/cvsroot/uz/c64/cc65/src/cc65/scanner.c,v
retrieving revision 1.12.4.1
diff -u -r1.12.4.1 scanner.c
--- scanner.c	2001/03/08 14:44:50	1.12.4.1
+++ scanner.c	2001/06/24 15:39:02
@@ -151,7 +151,7 @@
      	    }
 	    Preprocess ();
      	}
-	if (CurC == ' ' || CurC == '\r') {
+	if (CurC == ' ' || CurC == '\r' || CurC == '\n') {
     	    NextChar ();
 	} else {
     	    return 1;
-----------------------------------------------------------------------------

Regards


        Uz


--
Ullrich von Bassewitz                                  uz_at_musoftware.de
				  
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2001-12-14 22:05:40 CET