Re: [cc65] Extern decaration question

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2001-09-13 12:02:46


On Thu, Sep 13, 2001 at 12:21:16AM +0200, Adam Dunkels wrote:
> It is hard to do anything today without thinking of the horrible terrorist
> attack on the USA yesterday. I therefore wish to express my deepest sympathy
> to the American members of this list, and to everyone who might have lost
> friends or loved ones in this tragic event.

I and all of my family have been completely shocked by this act of terrorism.
My condolences to all the families of the victims. And I wish I could say
anything more useful.

> In cc65, the following code generates an error:
[...]
> Should this be considered as a bug, or is it how the ANSI C specification
> works?

It is a bug. If you're able to compile the compiler, here is a patch:

----------------------------------------------------------------------------
Index: src/cc65/symtab.c
===================================================================
RCS file: /usr/local/cvsroot/uz/c64/cc65/src/cc65/symtab.c,v
retrieving revision 1.12
diff -c -r1.12 symtab.c
*** src/cc65/symtab.c	2000/12/04 20:39:17	1.12
--- src/cc65/symtab.c	2001/09/13 10:00:39
***************
*** 692,698 ****
      	    unsigned Size  = Decode (Type + 1);
      	    unsigned ESize = Decode (EType + 1);

!     	    if ((Size != 0 && ESize != 0) ||
      	  	TypeCmp (Type+DECODE_SIZE+1, EType+DECODE_SIZE+1) < TC_EQUAL) {
      	  	/* Types not identical: Conflicting types */
      	  	Error ("Conflicting types for `%s'", Name);
--- 692,698 ----
      	    unsigned Size  = Decode (Type + 1);
      	    unsigned ESize = Decode (EType + 1);

!     	    if ((Size != 0 && ESize != 0 && Size != ESize) ||
      	  	TypeCmp (Type+DECODE_SIZE+1, EType+DECODE_SIZE+1) < TC_EQUAL) {
      	  	/* Types not identical: Conflicting types */
      	  	Error ("Conflicting types for `%s'", Name);
----------------------------------------------------------------------------

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:42 CET