Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!boingo.med.jhu.edu!haven!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: ANSI Standards Message-ID: <15702@smoke.brl.mil> Date: 4 Apr 91 17:43:56 GMT References: <104@hdwr1.medar.com> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 29 In article <104@hdwr1.medar.com> jseymour@medar.com (James Seymour) writes: >Does the ANSI standard eliminate the original K&R format (eventually)? No. It is flagged as an "obsolescent feature", which serves two purposes: it encourages programmers to not use it unnecessarily, and it indicates to future C standardization committees that X3J11 considered it appropriate for this feature to be considered for removal in some future C standard. However, its removal at some future date is not mandated. >...does it look like that's the way "everybody" will be doing it in the >future? Btw: I've yet to see code from any source using the new >ANSI format, other than examples in some texts. I think most serious development of portable applications in C at present has to accommodate compilers that support only the old style of function declaration. What some of us have done is to, in one way or another, key on the __STDC__ macro to determine whether or not the prototype form is employed, but maintain the policy of not relying on the special behavior of prototypes (i.e. no automatic conversion of arguments, and use solely of default-widened parameter types). >2) Parenthesis are not required for return statements, but according to > the Second Edition K&R work, they are, and will remain, acceptable. > I *have* seen lots of code where the parens are not used. Does this > seem to be the way most folks are heading? If so, why? Parentheses are always allowed around expressions. There is no reason to expect that to ever change. Use of redundant parentheses is purely a stylistic issue.