pls@ncsu.UUCP (Phillip L. Shaffer) (11/07/84)
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)
david@ukma.UUCP (David Herron) (11/12/84)
<> From: pls@ncsu.UUCP (Phillip L. Shaffer) <> Subject: Space after undeclared function name <> Message-ID: <2720@ncsu.UUCP> <> 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) My opinion is that they are being overly picky. It reminds me of the PR1ME's the school has for class work. Only two compilers on there even know what a TAB character is, all the others complain loudly about unknown characters. (One is a ratfor compiler we found from the prime user group, and used until they got a C compiler, which is the other compiler to know what a tab is.) ----------------------------------------- David Herron Phone: (606) 257-4244 (phone will be answered as "Vax Lab", usually). (606) 254-7820 /------- Arpa-Net unmvax----\ / research >---/----------------/----------- anlams!ukma!david boulder---/ / decvax!ucbvax ---/ (or cbosgd!hasmed!qusavx!ukma!david) For arpa-net, anlams has the name ANL-MCS. (i.e. use "ukma!david@ANL-MCS"). I have been having intermittent problems with this address though.