------- Comment #19 from kargl at gcc dot gnu dot org 2009-09-21 18:01 ------- (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? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41219