Quirk in assignment of pointers to functions ..

Chris Torek chris at umcp-cs.UUCP
Fri Jan 31 04:41:56 AEST 1986


In article <437 at ur-helheim.UUCP> badri at ur-helheim.UUCP writes:

> void abc(), (*f)();
>  ...
> f = abc;
>
> was not accepted by our preprocessor (we run BSD4.2).  [This]
> leads me to believe that the 4.3 preprocessor handles things slightly
> differently.

The bug in not in the preprocessor.  Remember: the C preprocessor
knows no C.  It does not care what you feed it.  It is used for
assembly code in the 4BSD kernell, for example.

Anyway, to answer the question, the 4.2 compiler mishandles `void';
the 4.3 compiler does not.  Donn Seeley (of F77 compiler fame) fixed
it.  (Thanks, Donn.)
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 1415)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris at umcp-cs		ARPA:	chris at mimsy.umd.edu



More information about the Comp.lang.c mailing list