[comp.sys.amiga.misc] Is there a bug in the Lattice C compiler?

hclausen@adspdk.UUCP (Henrik Clausen) (02/28/91)

In article <1991Feb25.171518.27271@odin.diku.dk>, Klavs Torben Pedersen writes:

> Hi!

   Hej Klavs!

>    I've been sitting for a long time trying to figure out, if it's me who are
> using far addressing in the wrong way, or there is a bug...
>    As stressed several times in the manual I use the new keywords far and
> chip on every global variable instead using -abcd and -b0 on the option-line.

   Fine. I never use far, anyway, hardly need it. Might if I had more than
64K data.

> This goes fine. After that I link without SmallData option using upstart
> module c.o and library lcm.lib, lc.lib and amiga.lib. But suddenly the linker
> drops out telling me, that there is a reference to an unmerged item??? 

   You probably refer to the (chip) variable(s) as extern from some other
module, without the chip keyword. Add this keyword to every "extern"
reference to those variables.

> also tried to mess a bit with NOALVS, without succes.)

   Don't! -b0 won't get you anywhere, rest assured.

>    Now to the funny part. Before I ran the program I checked the available
> memory, and after exiting there is missing 'bout 3k using the -b0 program???

   Dunno about this one.

> Am I doing something wrong? or is it a bug?

   Not a bug. Just tell the compiler the same thing at every declaration.

   There are bugs, but they're much more intricate than the above.



                                             God fornxjelse    -Henrik
______________________________________________________________________________
| Henrik Clausen, Graffiti Data | If the Doors of Perception where cleansed, |
| ...{pyramid|rutgers}!cbmvax!  | Man would see Reality as it is - Infinite. |
\______cbmehq!adspdk!hclausen___|_________________________________W. Blake___/