From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1002 invoked by alias); 24 Jul 2015 22:42:07 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 993 invoked by uid 89); 24 Jul 2015 22:42:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f174.google.com Received: from mail-wi0-f174.google.com (HELO mail-wi0-f174.google.com) (209.85.212.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 24 Jul 2015 22:42:05 +0000 Received: by wibud3 with SMTP id ud3so47272327wib.0 for ; Fri, 24 Jul 2015 15:42:02 -0700 (PDT) X-Received: by 10.180.89.104 with SMTP id bn8mr1146657wib.6.1437777722287; Fri, 24 Jul 2015 15:42:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.188.139 with HTTP; Fri, 24 Jul 2015 15:41:22 -0700 (PDT) In-Reply-To: References: <55B127D7.3020202@redhat.com> <55B29270.1030206@redhat.com> From: =?UTF-8?B?TWFudWVsIEzDs3Blei1JYsOhw7Fleg==?= Date: Fri, 24 Jul 2015 23:15:00 -0000 Message-ID: Subject: Re: PR c/16351 Extend Wnonnull for returns_nonnull To: Patrick Palka Cc: Jeff Law , Gcc Patch List , Jason Merrill , "Joseph S. Myers" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2015-07/txt/msg02130.txt.bz2 On 25 July 2015 at 00:17, Patrick Palka wrote: > On Fri, Jul 24, 2015 at 5:55 PM, Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez > wrote: > Is there a PR for this particular test case? I am interested in > improving the uninit analysis for gcc 6 so this potentially seems up > my alley. We do not warn because of the infamous PR18501 (probably the -Wuninitialized bug with the highest number of duplicates), where CPP removes the default SSA definition of n and simply returns 1 unconditionally. But fixing PR18501 may not be necessary to detect this case (Clang does it before doing any optimization). There are other cases that would be better warned from the FE: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D19808 Cheers, Manuel. =2E