🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.programming
Article #1

Re: Is there a bug in the Lattice C compiler?

#1
From: Henrik Clausen
Date: Thu, 28 Feb 1991 08:30
44 lines
2319 bytes
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___/
Technical Details
Message-ID: <18c08eaa.ARN18c3@adspdk.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!uunet!cbmvax!cbmehq!cbmdeo!adspdk!hclausen
References: <1991Feb25.171518.27271@odin.diku.dk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!uunet!cbmvax!cbmehq!cbmdeo!adspdk!hclausen
From: hclausen@adspdk.UUCP (Henrik Clausen)
Newsgroups: comp.sys.amiga.programming,comp.sys.amiga.misc
Subject: Re: Is there a bug in the Lattice C compiler?
Message-ID: <18c08eaa.ARN18c3@adspdk.UUCP>
Date: 28 Feb 91 08:30:18 GMT
References: <1991Feb25.171518.27271@odin.diku.dk>
Reply-To: hclausen@adspdk.UUCP
Followup-To: comp.sys.amiga
Organization: Graffiti Data
Lines: 44