Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site sdcrdcf.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!ittvax!dcdwest!sdcsvax!sdcrdcf!jonab From: jonab@sdcrdcf.UUCP (Jonathan Biggar) Newsgroups: net.unix,net.bugs.4bsd Subject: Re: Compiler bug Message-ID: <1955@sdcrdcf.UUCP> Date: Wed, 8-May-85 11:39:55 EDT Article-I.D.: sdcrdcf.1955 Posted: Wed May 8 11:39:55 1985 Date-Received: Sat, 11-May-85 00:04:35 EDT References: <1136@sjuvax.UUCP> Reply-To: jonab@sdcrdcf.UUCP (Jonathan Biggar) Distribution: net Organization: System Development Corp. R+D, Santa Monica Lines: 19 Xref: watmath net.unix:4469 net.bugs.4bsd:1513 Summary: In article <1136@sjuvax.UUCP> jss@sjuvax.UUCP (J. Shapiro) writes: >I recently noticed that the following will not compile correctly on a >4.2 BSD system: > >extern int usr1(), usr2(), usr3(); > >int usrprocs[] = { usr1, usr2, usr3 } > >whereas it compiles correctly on intel machines, cromix, and Aztec C. >It seems to me that this is something the linker should be able to handle >correctly, and therefore should not be a bug. It won't compile under 4.2bsd because the code is WRONG! The array should be declared as: int (*usrprocs[])() = { usr1, usr2, usr3 }; Jon Biggar {allegra,burdvax,cbosgd,hplabs,ihnp4,sdccsu3}!sdcrdcf!jonab