Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!sjsca4!konath From: konath@sj.ate.slb.com (Kannan Konath) Newsgroups: comp.lang.c Subject: calling a function without arguments Keywords: function Message-ID: <1989Dec22.013757.3086@sj.ate.slb.com> Date: 22 Dec 89 01:37:57 GMT Reply-To: konath@vonneumann.UUCP (Kannan Konath) Organization: Schlumberger ATE, San Jose, CA Lines: 43 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: extern void foo(); ... void foo() { ... ... ... } In a later part of the program in some function I call foo: foo; The parenthesis are missing and the compiler does not point this error out. It does not seem to generate any assembly code for this call to the function (procedure) "foo". I am compiling the program on a Sun-3 running Sun-OS 4.X and using the cc compiler. I want to know whether this error should be pointed out by the compiler? If the answer is no, what is the reason? It took me a day or so to spot this error when I tried to set a breakpoint at this statement in dbxtool which automatically set the breakpoint at the statement following this one. Could you please email me any replies and I will summarize if there is interest. kannan konath@sj.ate.slb.com