From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31507 invoked by alias); 7 Sep 2009 11:27:30 -0000 Received: (qmail 31434 invoked by uid 48); 7 Sep 2009 11:27:12 -0000 Date: Mon, 07 Sep 2009 11:27:00 -0000 Message-ID: <20090907112712.31433.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: "sezeroz at gmail dot com" 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/msg00739.txt.bz2 ------- Comment #10 from sezeroz at gmail dot com 2009-09-07 11:27 ------- (In reply to comment #6) > (In reply to comment #2) > > Janne, I think the warning about "unix.c:750:15: warning: �statbuf.st_mode� may > > be used uninitialized" is spurious, but can you have a look? > > Yes, it's spurious, and I submitted a patch > (http://gcc.gnu.org/ml/gcc-patches/2009-09/msg00419.html), but maybe the > middle-end shouldn't warn about it anyway (see the reply by Richard Guenther). The warning must be due to the inline fstat() implementation in mingw-w64. Excerpt from stat.h: __CRT_INLINE int __cdecl fstat(int _Desc,struct stat *_Stat) { struct _stat64 st; int ret=_fstat64(_Desc,&st); if (ret == -1) { memset(_Stat,0,sizeof(struct stat)); return -1; } /* rest of the code */ Note that the memset() in the failure case was only recently added in our svn, at rev. 1306, so this warning shouldn't be experienced with mingw-w64 rev.1306 or later. Older revisions didn't touch the input buffer on failure which should be the reason for the warning. -- sezeroz at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sezeroz at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41219