minshall@kinetics.UUCP (Greg Minshall) (06/07/89)
I am curious about known bugs in the release level C compiler for MPW 3.0.
We recently discovered the following bug, and now I'm a bit leary of what else
might be lurking in the woodshed. (By the way, in our 10,000 lines of code
or so, the following construct [bitfields and the &= operator] occured only
once.)
If anyone could post a somewhat authoritive list... Otherwise, I'll be glad
to accept contributions and then post a list of received bugs in the
next few weeks.
Greg Minshall 1-415-947-0998
minshall@kinetics.com Kinetics, a division of Excelan, Inc.
main()
{
struct foo {
short a;
short b:3, c:13;
} this, that, *p = &this;
p->b = 1;
p->b &= ~1;
printf("p->b = %x\n", p->b);
p->b = 1;
p->b = p->b & ~1;
printf("Now, p->b = %x\n", p->b);
}
#if 0
/* I run the above, and I get...
# 4:24:30 PM ----- Build of testbitand.
# 4:24:30 PM ----- Analyzing dependencies.
# 4:24:33 PM ----- Executing build commands.
C testbitand.c
### Warning 254 Local variable "that" not used within the body of the function : main
#--------------------------------------------------------------------------------------------------------------------------------
File "testbitand.c"; Line 19
#--------------------------------------------------------------------------------------------------------------------------------
Link -w -c 'MPS ' -t MPST testbitand.c.o ...whatever
# 4:24:49 PM ----- Done.
testbitand
p->b = 1
Now, p->b = 0
*/
#endif