This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 'xxx' may be used uninitialized in this function


On Wed, Aug 09, 2006 at 08:35:42AM -0700, Bruce Korb wrote:
> or else:
> 
>  extern void yyy( int* zzz __sets_value__ );
> 
>  void foo(void) {
>    int xxx;
>   yyy( &xxx );
>  ....
> 
> Where "__sets_value__" implies both that the current value is not
> accessed and that it will be set before returning, so hush up about
> any uninitialized argument value.

There's more to it than that, unless your compiler is very broken.
GCC should not warn for "int x; foo (&x);".

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]