From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BFBEA386F454; Wed, 27 May 2020 04:50:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BFBEA386F454 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1590555010; bh=AR08nULWc6436eMqFpnlpJ4zn1pEAM3QamfEsK9w9pU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZXLZwuSRzYYT5WQkDcerCx2aB/SwzNZA4o2grfFbqfS4m83OISwjQDx73EIqFVUvH SrnMWS2wpVi2j2C6+Pr8n4cE/CuYBpx1TsKUCv5j96m+NKZEufnmuQ+KqCFmfvPx5E AQfBE87ZBb3nkqMNib7Kpo1Vl3R967J/7uMc9OKI= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/95354] GCC misuse "nonnull-attribute" option and can not detect it as UB as well Date: Wed, 27 May 2020 04:50:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2020 04:50:10 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95354 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #1 from Andrew Pinski --- No, The place where nonnull attribute is not on the argument itself but rather = on the function. See the document at: https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Common-Function-Attributes.ht= ml#index-nonnull-function-attribute THIS IS WHY GCC Is warning on that pointer and all.=