
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