Aztec C compiler bug(?)
Craig Knelsen
CRAIG%UREGINA1.BITNET at WISCVM.WISC.EDU
Fri May 9 15:03:02 AEST 1986
#include <quickdraw.h>
#include <window.h>
#include <control.h>
main()
{
register ControlHandle p;
f((*p)->contrlTitle);
}
----
-? cc c.c
c.c: line 9: error 29: illegal use of structure:
Compiler: Aztec C 1.06G for the Macintosh
The problem seems to result from the fact that Aztec changed the
declaration of the member 'contrlTitle' in control.h:
1.06D release:
char contrlTitle[1];
1.06G release:
Str255 contrlTitle;
where Str255 is a typedef for: char *
I have tried this example under the Vax 4.2bsd and Sun 2.0 compilers
with no complaints from either. Changing the declaration back to what it
was in the 1.06D release makes the problem disappear. Removing the register
storage class declaration doesn't make a difference as far as the error is
concerned.
Craig Knelsen
Dept. of Computer Science
University of Regina
Regina, Sk.
UUCP: {ihnp4 | utcsri | alberta} !sask!regina!cknelsen
More information about the Comp.lang.c
mailing list