Floating Point
15-Feb-90 13:39:00
Sb: #90305-Floating Point
Fm: David Hamkins 76515,1650
To: Mike Spille/Manx 71545,1466
The following examples illustrate some of the bugs I've encountered with
5.0a to date.
Bug 1: 5.0a treats 0.0 as a char in the presence of float prototypes.
Example:
void foo( float null ) { }
main(void) {
foo( 0.0 ) ; }
Aztec C Version 5.0a Jan 9 1990 7:57:19
Copyright 1989 by Manx Software Systems, Inc.
clr.s -(sp)
^ File TMPA341.TMP; Line 16 # Opcode extension size
did not match. 1 errors
Bug 2: Prototypes are not generated correctly for functions taking array,
or pointer to array arguments.
Example:
void foo1( char (*array)[3][2] ) { }
void foo2(array) char (*array)[3][2] ; { }
The above program, test.c, when compiled with -qp produces:
void foo1(char array[2][3]*); void foo2(char array[2][3]*);
Bug 3 (example superfluous): -wq logs only the first 25 (approximately)
errors to AztecC.err. Additional errors are not logged, even when -ww is
used.
Tracking down these bugs takes time. Reporting the bugs in a general sense
is much easier. In this spirit I've encountered the following additional
bug.
Bug 4 (sans example): _stkchk (via the -bd option) will occasionally
corrupt the instruction immediately following its invocation (i.e.
immediately following jsr __stkchk).
Bug 5 (suspected, but not confirmed): sizeof(int) may not be working
correctly. I *suspect* that sizeof(int) does not know whether 16 bit or 32
bit ints are being used, although I *have not* confirmed this. I rewrote
the code using sizeof() and my problem disappeared.
Mike, please keep me informed of the progress in correcting the
above-mentioned bugs. In the past, compiler upgrades have been
clandestine. Not once was I notified of an upgrade or a bug fix.
In addition to these bugs, I have noticed that SDB bogs down when
displaying source from lengthy source modules. SDB is a pain to use when
working on modules longer than about 1000 lines of code.
Forgive me if I seem blunt in my criticism of 5.0a. I realize that much
has changed since 3.6 and that errors can be expected. If Manx supports
5.0a with courtesy, and corrects bugs promptly – if it offers