From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1376 invoked by alias); 27 Nov 2014 05:47:17 -0000 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 Received: (qmail 1318 invoked by uid 48); 27 Nov 2014 05:47:14 -0000 From: "siddhesh at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/61294] [4.9 Regression] erroneous memset used with constant zero length parameter warning Date: Thu, 27 Nov 2014 05:47:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: siddhesh at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-11/txt/msg03198.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61294 --- Comment #13 from Siddhesh Poyarekar --- Fixed in glibc: commit 1721f0a406e52f976f9daf6f59acf42c1dbd33ff Author: Siddhesh Poyarekar Date: Thu Nov 27 11:15:45 2014 +0530 Don't use __warn_memset_zero_len for gcc-5.0 or newer gcc now warns when the arguments to memset may have been accidentally transposed (i.e. length set to zero instead of the byte), so we don't need that bit of the code in glibc headers anymore. Tested on x86_64. Coe generated by gcc 4.8 is identical with or without the patch. I also tested gcc master, which does not result in any new failures. It does fail quite a few FORTIFY_SOURCE tests, but those failures are not due to this patch.