From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118476 invoked by alias); 25 Jul 2015 17:02:28 -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 118426 invoked by uid 89); 25 Jul 2015 17:02:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f171.google.com Received: from mail-wi0-f171.google.com (HELO mail-wi0-f171.google.com) (209.85.212.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sat, 25 Jul 2015 17:02:26 +0000 Received: by wicmv11 with SMTP id mv11so94134967wic.0 for ; Sat, 25 Jul 2015 10:02:24 -0700 (PDT) X-Received: by 10.180.77.129 with SMTP id s1mr8074496wiw.67.1437843743930; Sat, 25 Jul 2015 10:02:23 -0700 (PDT) Received: from android-5344fe5e44c2fa60.weghof (212-60-160-79.adsl.highway.telekom.at. [212.60.160.79]) by smtp.gmail.com with ESMTPSA id ev8sm18401883wjb.8.2015.07.25.10.02.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 25 Jul 2015 10:02:22 -0700 (PDT) User-Agent: K-9 Mail for Android In-Reply-To: <20150724231521.GB29097@tsaunders-iceball.corp.tor1.mozilla.com> References: <55B127D7.3020202@redhat.com> <55B29270.1030206@redhat.com> <20150724231521.GB29097@tsaunders-iceball.corp.tor1.mozilla.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: PR c/16351 Extend Wnonnull for returns_nonnull From: Bernhard Reutner-Fischer Date: Sat, 25 Jul 2015 18:43:00 -0000 To: Trevor Saunders ,=?ISO-8859-1?Q?Manuel_L=F3pez-Ib=E1=F1ez?= CC: Jeff Law ,Gcc Patch List ,Jason Merrill ,"Joseph S. Myers" Message-ID: X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg02161.txt.bz2 On July 25, 2015 1:15:21 AM GMT+02:00, Trevor Saunders wrote: > >Another case is > >Foo * >bar() >{ > #if SHOULD_USE_BAR > ... >#else > return NULL; >#endif >} > >And somehow your program is setup so bar is only called when >SHOULD_USE_BAR is defined. In that sort of case it may be convenient >for the function bar to always be defined, but not for the type Foo to >be defined in which case there is no real value for the function to >return. Which just proves that cxx is just too broken^wcomplicated to grok for any human being or compiler, for that matter |) Cheers,