... # > $ cat foo.c # > int main(void) { # > int a; # > a+=1; # > return a; # > } # > $ gcc -O -W -Wall -Wuninitialized -Winit-self foo.c # > foo.c: In function `main': # > foo.c:2: warning: 'a' might be used uninitialized in this function # # True, but the compiler should warn about bogus source code, even if the # resulting object code (depending on optmiziation flags) is valid. Yes, but this type of warning needs data flow analysis, which IIRC is documented to need at least -O1. So I suspect the original code may have been compiled without optimization. Regards, Jens -- Jens Schweikhardt http://www.schweikhardt.net/ SIGSIG -- signature too long (core dumped)Received on Sun Apr 10 2005 - 18:56:12 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:31 UTC