Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!mcvax!kth!draken!d88-jwa From: d88-jwa@nada.kth.se (Jon W{tte) Newsgroups: comp.lang.c Subject: Turbo Trouble Summary: Turbo C 2.0 hangs on me ! Message-ID: <1159@draken.nada.kth.se> Date: 3 Jun 89 09:38:15 GMT Reply-To: h+@nada.kth.se (Jon W{tte) Organization: Royal Institute of Technology, Stockholm, Sweden Lines: 31 I recently ran into a problem (bug ?) in Turbo C 2.0 using #define: #define SetRect(rectp, t, l, b, r)\ (rectp)->top = t, (rectp)->left = l, (rectp)->bottom = b, (rectp)->right = r This macro later gets called by: [definitions, among them struct rect { int left, top .......] rect r; SetRect(&r, 20, 20, 200, 400); This should be fairly legal. I tried to compile it, and my machine (Victor V286A with 640 kBytes RAM) hung on me: Internal Stack Overflow -- System halted Can anyone there post or email an answer ? Is this a known bug ? There should not have been any memory problems, since all of the code was a bit under 100 lines... Plus a few standard libs (Graph.h, stdio.h and stdlib.h) The memory left meter didn't go below 100k, I'm fairly sure. Oh, by the way, Turbo C places compilation warnings and errors wrong in the source if you have macros longer than one line. For those who want to know: Yes, I am writing a "Compatibility" package for Macintosh -> PC ports, personal use. -- __ Jon W{tte (The dread Smiley Shark) email:h+@nada.kth.se / \ (+46 (0) 8 258 268) /--- (c) 1989 Yessbox Allright Professional Products Inc. - Y.A.P.P.I. / -- No More --