[U-Boot] use of C99

Kumar Gala
2009-04-08T18:51:06Z

I was wondering if there was any reason we avoid C99 features in u-
boot source.

Specifically the ability to declare variables in the middle of
functions.

There are a slew of places that we have something like:

foobar()
{
...

#ifdef CONFIG_COOL_FEATURE
u32 myvarrocks;
#endif

...

#ifdef CONFIG_COOL_FEATURE
myvarrocks = foo * bar * bar;

gd->neato = myvarrocks
#endif

it would be nice to just have:

foobar()
{

...

#ifdef CONFIG_COOL_FEATURE
u32 myvarrocks = foo * bar * bar;

gd->neato = myvarrocks
#endif

- k