Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ncsu.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!mcnc!ncsu!pls From: pls@ncsu.UUCP (Phillip L. Shaffer) Newsgroups: net.lang.c Subject: Space after undeclared function name Message-ID: <2720@ncsu.UUCP> Date: Wed, 7-Nov-84 09:16:47 EST Article-I.D.: ncsu.2720 Posted: Wed Nov 7 09:16:47 1984 Date-Received: Fri, 9-Nov-84 08:48:01 EST Organization: N.C. State University, Raleigh Lines: 36 I would like to obtain a consensus, or at least a few opinions, on a minor point in C syntax. I have recently obtained the Eco-C C compiler for my Z-80 machine, and and am generally happy. It is doing one thing that I haven't seen before in other C compilers (namely UNIX 4.2BSD or DeSmet on an IBM PC): it complains about spaces after function names for funtions that have not been previously declared - the error message is "illegal function call," or somesuch. If you declare int functions before use, there is no problem. Thus: int foo(); foo (); causes no problem, but foo (); generates the complaint. K&R (p. 186, paragraph 4) seem to sanction this: "a hitherto unseen identifier followed immediately by a left parenthesis is contextually declared to represent a function returning an integer; thus, in the most common case, integer- valued functions need not be declared." The question is: does "followed immediately" mean "with nothing but white space in between" or is it to be taken literally? This is a minor annoyance to me - changing styles slightly and editing old programs before recompiling - but I thought I would get some other opinions before complaining to Eco-Soft. I will appreciate any responses - send mail to me and I will summarize (or post your response if you like). Thanks. Phil Shaffer (pls@ncsu)