[Coco] "C" Compiler C_PREP19 errors or mine?

Stephen H. Fischer SFischer1 at Mindspring.com
Mon May 23 15:07:28 EDT 2011


Hi,

I just discovered that the original "c.prep" had a bug.

The spec says NO replace substitution in strings but I found this in the 
source of one of my programs.
------------------------------------------ 
#define EDITION 2 > 88/02/17

#define ARCHID fputs(" ARCHIVE ED= EDITION \n", stdout);
/* note bug in compiler allows EDITION to be substituted, spec says no
substitutions within quoted strings */

case 'b':
CLR_SCRN
ARCHID
action = AC_READWD;
break;
------------------------------------------ 
The EDITION string is displayed as part of the "b" command.

But "c.prep" does not have __DATE__, __TIME__ and __FILE__ defined of 
course.

So

#define DATE1 " __DATE__ "

will not work.

SHF 




More information about the Coco mailing list