4.2 C bugs?

Norman Diamond ndiamond at watdaisy.UUCP
Sat Mar 9 03:20:47 AEST 1985


> > f /* array of pointers */ cannot be initialized to functions.
> > If you want to initialize pointers to pointers, try:
> > 	void foo() {...}
> > 	void blort() {...}
> > 	void (*f[]) () = {
> > 		&foo,
> > 		&blort,
> > 		0
> > 	}
>
> WRONG, foo and blort are correctly the address of the function.
> Your example cause the warning " & before array or function ignored."

Yup, my mistake.  I should have learned by now, not to believe manuals'
rules on syntax and such things without trying them out first....
-- 

   Norman Diamond

UUCP:  {decvax|utzoo|ihnp4|allegra}!watmath!watdaisy!ndiamond
CSNET: ndiamond%watdaisy at waterloo.csnet
ARPA:  ndiamond%watdaisy%waterloo.csnet at csnet-relay.arpa

"Opinions are those of the keyboard, and do not reflect on me or higher-ups."



More information about the Comp.lang.c mailing list