nathan@mit-eddie.MIT.EDU (Nathan Glasser) (09/05/86)
Is the following a known 4.2bsc C compiler bug? I think I had heard
of something related to this.
The following program segment:
foo()
{
void goo();
void (*moo)();
moo = goo;
}
Produces the error:
"void.c", line 6: operands of = have incompatible types
Yet this should be a valid use of a function pointer, and replacing
the void's by int's removes the error.
Also, does anybody whether the 4.3 compiler still has this bug?
Thanks,
--
Nathan Glasser
nathan@mit-eddie.uucp (usenet)
nathan@xx.lcs.mit.edu (arpa)
ark@alice.UucP (Andrew Koenig) (09/06/86)
> The following program segment: > > foo() > { > void goo(); > void (*moo)(); > > moo = goo; > } > > Produces the error: > > "void.c", line 6: operands of = have incompatible types In that case, your compiler is broken.
corwin@hope.UUCP (John Kempf) (09/07/86)
> > Is the following a known 4.2bsc C compiler bug? I think I had heard > of something related to this. > > The following program segment: > > foo() > { > void goo(); > void (*moo)(); > > moo = goo; > } > > Produces the error: > > "void.c", line 6: operands of = have incompatible types > Also, does anybody whether the 4.3 compiler still has this bug? "Fixed in 4.3" -- -cory "No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style." VOICE: (714) 788 0709 UUCP: {ucbvax!ucdavis,sdcsvax,ucivax}!ucrmath!hope!corwin ARPA: ucrmath!hope!corwin@sdcsvax.ucsd.edu USNAIL: 3637 Canyon Crest apt G302 Riverside Ca. 92507