Patch for various warnings in gcc

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Thu Aug 8 10:53:00 GMT 2002


 > From: "John David Anglin" <dave@hiauly1.hia.nrc.ca>
 > 
 > > int main()
 > > {
 > >   int a = a;
 > >   
 > >   return a;
 > > }
 > 
 > I tried it under HP cc (hpux10.20) and VAX Ultrix pcc, with and without "-O".
 > All compile without error and execute returning a status of 0, except
 > for HP cc at -O:
 > 
 > 507 (hiauly1)dave> cc -o self -O self.c
 > cc: line 5: warning 5004: Uninitialized variable "a" in function "main" (5004)

But it still compiled right?

I tried cc on irix6.2 and solaris2 and it worked.  So together that
would seem to eliminate my worry about vendor compilers, however I'm
still not thrilled about the potential non-deterministic aspect if a
real uninitialized reference was later introduced.

--
Kaveh R. Ghazi			Director of Systems Architecture
ghazi@caip.rutgers.edu		Qwest Solutions



More information about the Gcc-patches mailing list