Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site mtxinu.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!umcp-cs!gymble!lll-crg!dual!unisoft!mtxinu!ed From: ed@mtxinu.UUCP (Ed Gould) Newsgroups: net.unix,net.bugs.4bsd Subject: Re: Compiler bug Message-ID: <369@mtxinu.UUCP> Date: Thu, 9-May-85 20:39:32 EDT Article-I.D.: mtxinu.369 Posted: Thu May 9 20:39:32 1985 Date-Received: Sun, 12-May-85 02:21:51 EDT References: <1136@sjuvax.UUCP> Distribution: net Organization: mt Xinu, Berkeley, CA Lines: 31 Xref: linus net.unix:3878 net.bugs.4bsd:1215 > 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. > > Comments? > > Would someone be good enough to check this out on a sysV machine? > > Jon It seems to me that the second declaration should be int (*(usrprocs()))[] = { usr1, usr2, usr3 }; /* | |||| * | |----------|| * |-------------| */ since usr[123] are, in this context, *pointers* to functions. I couldnt get that to compile either, though. -- Ed Gould mt Xinu, 2910 Seventh St., Berkeley, CA 94710 USA {ucbvax,decvax}!mtxinu!ed +1 415 644 0146