J M Sharath Bharadwaj bharadwaj wrote:
hi All, Is GCC going to perform a better optimization, if I am going to initialize the variable explicitly. I am asking this because I was reading the GCC online doc for warning options like as in http://www.cs.cmu.edu/cgi-bin/info2www?(gcc.info)Warning%20Options
This is a strange question. If you read an uninitialized variable your program contains undefined behaviour, and optimization is going to be the least of your problems. If you don't read from an uninitialized variable it doesn't matter. Andrew.