Path: chuka.playstation.co.uk!news From: raasch@fh-worms.de (Michael Raasch) Newsgroups: scee.yaroze.programming.codewarrior Subject: CW bug Date: Sat, 16 Aug 1997 03:05:54 +0200 Organization: Michael Raasch Softwareentwicklung Lines: 35 Message-ID: NNTP-Posting-Host: port11.Fh-Worms.DE X-Newsreader: Anawave Gravity v1.10.570 Hi Codewarriors I hope somebody from Metrowerks reads this newsgroup. Below there are two files for explanation: "main.c" and "sincos.c" main() only reads a value out of the sintab[]. If you do not call the dummy-function sincos() the value of "a" is always 0, no matter which element if the array is read. But if you call sincos(), the value is set correctly. If you copy the sincos-array into the main.c the values are right even without calling this dummy-function. strange. any comments? main.c: extern const short sintab[]; extern void sincos(void); main() { short a; sincos(); a=sintab[3]; } sincos.c: const short sintab[] = { 0, 285, 571, 857, 1142, 1427, 1712, 1996 }; void sincos(void) { } -- hasta la pasta, .\\ichael "Wenn das John Wayne noch erlebt haette..."