[cc65] Externs within function

From: Dan <opendtv1yahoo.com>
Date: 2007-07-03 15:06:44
I noticed that cc65 treated externs inside functions
like statics, meaning that storage was allocated and
initialization was wrongly permitted.

Fix:

In locals.c, ParseOneDecl,

       	} else if ((SC & (SC_STATIC | SC_EXTERN)) ==
SC_STATIC) {
            /* Static variable */
            SymData = ParseStaticDecl (&Decl, &SC);
       	} else if ((SC & (SC_STATIC | SC_EXTERN)) ==
(SC_STATIC | SC_EXTERN)) {
            /* Extern variable */
		    if (CurTok.Tok == TOK_ASSIGN) {
				Error ("Can't initialize extern");
			}

Dan



       
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell. 
http://searchmarketing.yahoo.com/
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Jul 3 15:06:54 2007

This archive was generated by hypermail 2.1.8 : 2007-07-03 15:06:58 CEST