Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!brl-tgr!tgr!mbarker@BBNZ.ARPA From: mbarker@BBNZ.ARPA (Michael Barker) Newsgroups: net.lang.c Subject: oddity Message-ID: <1479@brl-tgr.ARPA> Date: Fri, 13-Sep-85 13:30:12 EDT Article-I.D.: brl-tgr.1479 Posted: Fri Sep 13 13:30:12 1985 Date-Received: Sat, 14-Sep-85 16:57:36 EDT Sender: news@brl-tgr.ARPA Lines: 54 two relatively simple (I hope) questions: 1. please test the following program on your compiler. Does it work? 2. should it? this is what a run of the program gives: before use 1 that's the rub after use 3 this is what lint had to say "ips.c", line 23: compiler error: compiler takes alignment of function If I get replies, I'll summarize sometime... If the net gets flames, we'll be contributing to the universal energy level... thanks mike ARPA: mbarker@bbnz.ARPA UUCP: harvard!bbnccv!mbarker P.S. no apologies for the indentation style - I like it. ----------------------------cut here------------------------------- /* test program to show quirk in typedef's */ #include typedef ford(); /* this is questionable statement 1 */ main() { ford fist; /* declare the function? question 2 */ int some; /* just filler */ some = 1; printf("before use %x\n",some); some = fist(); /* use it */ printf("after use %x\n",some); } ford fist /* see, mom, no parentheses? question 3 */ { /* this is line 23 ??? */ printf("that's the rub\n"); return(3); /* simple, eh? */ }