Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!caen!news.cs.indiana.edu!ux1.cso.uiuc.edu!cs326ag From: cs326ag@ux1.cso.uiuc.edu (Loren J. Rittle) Newsgroups: comp.sys.amiga.programmer Subject: Re: > SAS gripes (was DICE vs GCC) Message-ID: <1991Apr9.171831.23312@ux1.cso.uiuc.edu> Date: 9 Apr 91 17:18:31 GMT Organization: University of Illinois at Urbana Lines: 61 In article <24@triumph.tsd.arlut.utexas.edu> lofaso@triumph.tsd.arlut.utexas.edu (Bernie Lofaso) writes: >In article <1991Apr5.173845.4404@nntp-server.caltech.edu>, tll@nntp-server.caltech.edu (Tal Lewis Lancaster) writes: > >> Well the main reason is I am creating object files greater than 32K (actually >> some are around 80K). SAS and Aztec can not handle object files > 32K. Or to >> be more precise a function call to another function in the same object file must >> be < 32K apart. > >Sorry, but this is not true. The 32K limit is only for a small code model. >You can specify a large memory model for code with a compiler switch and >the object modules can be any size you want. This pertains to Aztec C but I >would expect SAS to have similar functionality. I think some of the confusion can be shown with the following example: #define TEN(a) a;a;a;a;a;a;a;a;a;a; void test(int a, int b, int c, int d, int e, int f); int a, b, c, d, e, f; void main(void) { a: TEN(TEN(test(a, b, c, d, e, f))) TEN(TEN(test(a, b, c, d, e, f))) TEN(TEN(test(a, b, c, d, e, f))) TEN(TEN(test(a, b, c, d, e, f))) TEN(TEN(test(a, b, c, d, e, f))) TEN(TEN(test(a, b, c, d, e, f))) TEN(TEN(test(a, b, c, d, e, f))) TEN(TEN(test(a, b, c, d, e, f))) TEN(TEN(test(a, b, c, d, e, f))) TEN(TEN(test(a, b, c, d, e, f))) TEN(TEN(test(a, b, c, d, e, f))) TEN(TEN(test(a, b, c, d, e, f))) goto a; } When compiled with `lc -L -b0 -r0 -d0 test' yields: SAS/C Compiler V5.10a for AmigaDOS Copyright (C) 1990 SAS Institute, Inc. All Rights Reserved. Compiling test.c Code size greater than 32767 bytes - branches may be incorrect Please put some subroutines into separate source files. BUT, the code that was generated looks ok. goto a: generated a BRA.L instruction as expected, etc. Why does SAS/C give me that bogus warning? Who knows! I only have *one* function in the source file! ALSO, note, TEN(TEN(TEN(test(a, b, c, d, e, f)))) caused the machine to crash... :-( Loren J. Rittle -- ``The Amiga continues to amaze me--if I had not been told that this video was created using the Amiga and Toaster, I would not have believed it. Even Allen said, `I think I know how he did most of the effects.' '' - Jim Lange Loren J. Rittle l-rittle@uiuc.edu