Hi,

On Fri, 20 Aug 2010, H.J. Lu wrote:

> int x = 0;
> 
> to silence gcc from uninitialized warnings when I know it is
> unnecessary.  Is that a good idea to add
> 
> int x __attribute__ ((uninitialized));
> 
> to tell compiler that it is OK for "x" to be uninitialized?

int x = x;

is the way GCC offers this idiom since about forever, no need for an 
attribute.  Downthread I see that people worry about this generating an 
actual (uninitialized) access to x.  They are confused.


Ciao,
Michael.

Reply via email to