------- Comment #17 from burnus at gcc dot gnu dot org  2009-09-21 17:01 -------
> ../../../../../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 ...


> ../../../../../build/gcc/gcc/libgfortran/io/write.c:328:8: warning: passing
> argument 2 of 'write_default_char4' discards qualifiers from pointer target

crlf is "const" while write_default_char4 takes a normal "char4 *". (The
question is whether we can't simply make that "const char4 *" - ditto for
write_char etc.) If not, I think one can silent this warning (I somewhere had a
note how to do this).


> ../../../../../build/gcc/gcc/libgfortran/io/list_read.c:1847:10: warning:
> variable 'elem' might be clobbered by 'longjmp' or 'vfork'
> ../../../../../build/gcc/gcc/libgfortran/io/list_read.c:1849:10: warning:
> variable 'stride' might be clobbered by 'longjmp' or 'vfork'l

I think this comes due to list_formatted_read_scalar which uses
"setjmp()". I currently do not see whether there is a real problem or not;
"volatile" should help, but one should first search for another solution.


-- 


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

Reply via email to