Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site harvard.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!draves From: draves@harvard.ARPA (Richard Draves) Newsgroups: net.lang.c Subject: Function Calls Message-ID: <212@harvard.ARPA> Date: Wed, 12-Dec-84 17:08:44 EST Article-I.D.: harvard.212 Posted: Wed Dec 12 17:08:44 1984 Date-Received: Fri, 14-Dec-84 05:34:17 EST Distribution: net Organization: Aiken Computation Laboratory, Harvard Lines: 23 Which usage is correct: extern int (*a)(); extern int b(); main() { a = b; /* b's type promoted to pointer to function ... */ (*a)(); /* a legal function call */ b(); /* also legal */ a(); /* not legal, but often accepted */ (b)(); /* the question: which of these is correct? */ (*b)(); } Any compiler that accepts "(*b)()" and "a()" will probably also accept "(b)()". Our 4.2BSD cc accepts all three, and also "(**b)()", etc. Rich