Re: [cc65] preprocessor hazzle...

Date view Thread view Subject view

From: Ullrich von Bassewitz (
Date: 2002-07-30 11:03:04


On Tue, Jul 30, 2002 at 04:28:10AM +0200, groepaz wrote:
> well yes, its (ofcoz) like you say :o) there are global variables
> defined all over the source and then they are declared as extern in
> every function that uses them.

Ok. cc65 does not handle this correctly (it emits both, .import and .export
statements, something that is considered an error by the assember). I do
already have an idea how to fix this.

> (just as a sidenote, what benefit is
> expected from this way of declaring things? (instead of simply
> referring to the globals?) seen that in a couple of sources already,
> the testsuite for example uses this extensivly)

Maybe it's because the sources still work when the variable definitions are
moved to another file. But this is not a big issue, so it may also be just
some style thingie.

> i have knocked up a testprog that shows the problem more exactly (and
> another problem aswell).... attached at the bottom of this mail :)

Thanks a lot! I'm out of town until tomorrow evening, so don't expect any news
before thursday.



Ullrich von Bassewitz                        
To unsubscribe from the list send mail to 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 : 2002-07-30 11:04:07 CEST