From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Wed, 08 Apr 2009 18:40:42 -0500 Subject: [U-Boot] use of C99 In-Reply-To: <49DD31D0.8010400@acm.org> References: <4A0B9AAA-4714-4C27-84A7-22FCE4D91DDA@freescale.com> <49DD31D0.8010400@acm.org> Message-ID: <49DD35FA.5090008@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Larry Johnson wrote: > Kumar Gala wrote: >> I was wondering if there was any reason we avoid C99 features in u- >> boot source. > > Maybe the best reason is that the Linux kernel avoids them, Linux has a lot more inertia than a smaller project such as u-boot. > and staying consistent with the Linux coding style saves a lot of time and > headaches. IMO, this is worth the occasional clumsiness that results. Code seems to flow from Linux to u-boot more than the reverse -- I don't see much of a problem with being more permissive. > BTW, the Linux kernel does not avoid all C99 features. For example, it > relies heavily on named initialization of structs. However, AFAICT, it > shuns those C99 feature that originated in C++. I suspect that has more to do with people's feelings toward C++ than any unbiased assessment of the merits of the features. -Scott