Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!samsung!caen!uflorida!mlb.semi.harris.com!rtpark.rtp.semi.harris.com!mcnc!rti!mozart!walker From: walker@twix.unx.sas.com (Doug Walker) Newsgroups: comp.sys.amiga.programmer Subject: Re: SAS C 5.10A has problems Message-ID: <1991Jun21.152428.10283@unx.sas.com> Date: 21 Jun 91 15:24:28 GMT References: Sender: news@unx.sas.com (Noter of Newsworthy Events) Distribution: sas Organization: SAS Institute Inc. Lines: 68 Nntp-Posting-Host: twix.unx.sas.com Have you reported these problems to SAS/C technical support? I will summarize: 1. This is not a bug. You are asking the compiler to use 16-bit offsets relative to an address register to access global data. ("small data model") You are attempting to refer to a data item that isn't accessible on this model - struct Custom is at a fixed location. Therefore, you have to make an exception to the 'near data' rule - which you do with the 'far' keyword, exactly like you put it. If you really dislike 'far' for some reason, you can change the default with the -b0 option (You will have to link with different libraries.) 2. This is probably due to a known bug, although I can't tell without source code. We elected not to fix it since the fix would probably generate other bugs and this one is relatively rare - this is about the fifth time anyone has reported it in the year that 5.10 and 5.10a have been out. Judicious use of the 'volatile' keyword is the workaround - contact tech support for details. BTW, the reason you get a CXERR 99 and not a more reasonable message is that CXERR's only come out when "impossible" situations 3. I don't know what this is, please contact tech support with additional details. Is this the exact error message? I've never seen it before. In article , mykes@amiga0.SF-Bay.ORG (Mike Schwartz) writes: |> Not to start a new round of language wars, but I have been working |> with SAS 'C' for a few weeks (yes, I still write lots of assembler, too :) |> |> Anyway, I've found that SAS is full of bugs and problems, many of which I |> can find workarounds. At this point, I would like to get (perhaps) some |> answers from anyone on the net who might have solutions. E-Mail might |> be preferable, but if you think there is value to others in the solutions, |> please post. |> |> Problem #1: |> BLINK complains about "extern struct Custom custom;" It prints a |> cryptic error message like "offset too far from A4". I was able to fix |> it by doing "extern struct Custom far custom;" which may or may not be |> preferable anyway (I say it is debatable :) Many of the GfxMacros.h macros |> rely on this custom variable. |> |> Problem #2: |> When compiling some sources, I get CXERR: 99, which is NOT documented |> in the manual. Nice messages, eh folks? Real descriptive :) The compiler |> does not complain about anything else in the source file. This error comes up |> during the Optimizing phase. |> |> Problem #3: |> When compiling various sources, I get "Invalid section type in memory |> option" error message. I could find no documentation for this error message... |> -- ***** =*|_o_o|\\=====Doug Walker, Software Distiller====== BBS: (919)460-7430 = *|. o.| || 1200/2400/9600 Dual | o |// For all you do, this bug's for you! ====== usenet: walker@unx.sas.com plink: dwalker bix: djwalker