From patchwork Thu Feb 25 15:54:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Ellcey X-Patchwork-Id: 11087 Received: (qmail 93906 invoked by alias); 25 Feb 2016 15:54:40 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 93887 invoked by uid 89); 25 Feb 2016 15:54:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 spammy=sellcey@imgtec.com, sellceyimgteccom, H*r:sendmail, H*r:sSMTP X-HELO: mailapp01.imgtec.com From: "Steve Ellcey " Date: Thu, 25 Feb 2016 07:54:32 -0800 To: Subject: [Patch] Fix glibc testing with GCC 4.9 compiler User-Agent: Heirloom mailx 12.5 6/20/10 MIME-Version: 1.0 Message-ID: <68cad408-de62-4515-98ee-987574823403@BAMAIL02.ba.imgtec.org> I was testing glibc on a machine with GCC 4.9.2 and the tests died due to a warning in string/tester.c. This routine has a DIAG_IGNORE for -Wmemset-transposed-args at GCC 5.0 and above but this warning is also given by my GCC 4.9.2 compiler. This patch fixed the problem for me, is it OK to check it in? Steve Ellcey sellcey@imgtec.com 2016-02-25 Steve Ellcey * string/tester.c (test_memset): Use -Wmemset-transposed-args for GCC 4.9. diff --git a/string/tester.c b/string/tester.c index 7c36591..208384b 100644 --- a/string/tester.c +++ b/string/tester.c @@ -1305,10 +1305,10 @@ test_memset (void) equal(one, "axxxefgh", 2); /* Basic test. */ DIAG_PUSH_NEEDS_COMMENT; -#if __GNUC_PREREQ (5, 0) - /* GCC 5.0 warns about a zero-length memset because the arguments to memset +#if __GNUC_PREREQ (4, 9) + /* GCC 4.9 warns about a zero-length memset because the arguments to memset may be in the wrong order. But we really want to test this. */ - DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Wmemset-transposed-args") + DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wmemset-transposed-args") #endif (void) memset(one+2, 'y', 0); equal(one, "axxxefgh", 3); /* Zero-length set. */