[U-Boot] use of C99

Kumar Gala kumar.gala at freescale.com
Wed Apr 8 20:51:06 CEST 2009


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


More information about the U-Boot mailing list