------- Comment #20 from nightstrike at gmail dot com  2009-09-21 18:12 -------
(In reply to comment #19)
> (In reply to comment #18)
> > (In reply to comment #17)
> > > > ../../../../../build/gcc/gcc/libgfortran/intrinsics/iso_c_binding.c:98:24:
> > > > warning: 'str' may be used uninitialized in this function
> > > 
> > > I think this warning is bogus:
> > >       index_type size, str;
> > >       for (i = 0; i < shapeSize; i++)
> > >         {
> > >           if (i == 0)
> > >               str = 1;
> > >           else
> > >               str = str * GFC_DESCRIPTOR_EXTENT(f_ptr_out,i-1);
> > > But one could add a "str = 1" to silence the compiler ...
> > 
> > This looks dumb to begin with.  Just initialize str to 1 and run the 
> > for-loop
> > from 1 to shapeSize.  Starting at 0 and special casing zero is absurd.
> > 
> 
> Are you basing your comment on the code posted above or have you 
> actually looked at the code in iso_c_biniding.c?
> 

The code above.  I can't access the source tree atm.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41219

Reply via email to