Turbo Trouble
Jon W{tte
d88-jwa at nada.kth.se
Sat Jun 3 19:38:15 AEST 1989
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+ at nada.kth.se
/ \ (+46 (0) 8 258 268)
/--- (c) 1989 Yessbox Allright Professional Products Inc. - Y.A.P.P.I.
/ -- No More --
More information about the Comp.lang.c
mailing list