C style peeve and knowing the rules

ron klatchko klatchko at cory.Berkeley.EDU
Tue Apr 10 07:17:06 AEST 1990


In article <1273 at proxima.UUCP> lucio at proxima.UUCP (Lucio de Re) writes:
>In article <1990Mar26.023758.21002 at athena.mit.edu> scs at athena.mit.edu (Steve Summit) writes:
>>        retunr x;
>>is a compile-time error, while
>>        retunr(x);
>>doesn't complain until link time.  Admittedly a minuscule point.
>
>Not at all, I think it's a very good point; in fact the best to date.

It is a good point, if you are using a compiler that cannot handle
prototypes.  Otherwise, make sure that your compiler will issue a
warning if it you call a function that is not prototyped (in gcc, this
can be done using -Wimpilict or -Wall; in Microsoft C, this can be
done using -W3).  You can then indulge your personal style peeve and
still find out about a typo at compile time.

ron
------------------------------------------------------------------------------
Ron Klatchko         klatchko at cory.Berkeley.EDU       ...!ucbvax!cory!klatchko   



More information about the Comp.lang.c mailing list