[U-Boot] use of C99
Timur Tabi
timur at freescale.com
Wed Apr 8 22:57:37 CEST 2009
Premi, Sanjeev wrote:
> One of the biggest problem is uncontrolled variable definitions that
> gets even nasty when variables have same names with different types;
> though under different set of #ifdefs. Quite possible for commonly
> used variable names - i, ptr, tmp, etc.
Then let's just say that if you're going to define a variable in the
middle of a function, it can't have the same name as another variable in
that function.
> I feel, here, ifdefs provide a false sense of 'enclosure' with possibility
> of frequent breaches - in code (while implementing) and in simple reading
> (for understanding).
Sorry, I don't understand what you're talking about. The #ifdefs are
used to enable feature-specific code on platforms that have that feature.
--
Timur Tabi
Linux kernel developer at Freescale
More information about the U-Boot
mailing list