Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!aplcen!samsung!cs.utexas.edu!ut-emx!ibmchs!auschs!awdprime!fenway!mjones From: mjones@fenway.uucp (Mike Jones) Newsgroups: comp.lang.c Subject: Re: calling a function without arguments Keywords: function Message-ID: <1210@awdprime.UUCP> Date: 22 Dec 89 15:59:08 GMT References: <1989Dec22.013757.3086@sj.ate.slb.com> Sender: news@awdprime.UUCP Reply-To: mjones@fenway.aix.kingston.ibm.com (Mike Jones) Organization: IBM DSD, Kingston Lines: 16 In article <1989Dec22.013757.3086@sj.ate.slb.com> konath@vonneumann.UUCP (Kannan Konath) writes: >I have the following program which does not generate any error messages >from the compiler nor does it seem to output any assembly code for >this particular case: That's good, as there is no error in your example. Fact is, foo; is an entirely valid C statement with a different meaning from foo(); The first statement will evaluate to the address of foo(), which will then be thrown away (as you haven't told the compiler to do anything with it). A warning might be appropriate in this case, but it's certainly not an error. Mike Jones | When everything has been seen to work, all AIX Kernel Development | integrated, you have four more months work to do. Kingston, NY | - Charles Portman, ICL @cs.utexas.edu:ibmchs!auschs!fenway.aix.kingston.ibm.com!mjones