From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20708 invoked by alias); 21 Sep 2009 17:01:58 -0000 Received: (qmail 15641 invoked by uid 48); 21 Sep 2009 17:01:45 -0000 Date: Mon, 21 Sep 2009 17:01:00 -0000 Message-ID: <20090921170145.15637.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/41219] libgfortran build warnings In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-09/txt/msg02015.txt.bz2 ------- 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