From patchwork Tue Jun 2 20:00:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roland McGrath X-Patchwork-Id: 7015 Received: (qmail 104742 invoked by alias); 2 Jun 2015 20:00:35 -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 104503 invoked by uid 89); 2 Jun 2015 20:00:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL, BAYES_50, KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: topped-with-meat.com MIME-Version: 1.0 From: Roland McGrath To: "GNU C. Library" Subject: [COMMITTED PATCH] Fix setenv.c diagnostic pragma to be compatible with GCC 4.6 Message-Id: <20150602200030.94E542C3AB9@topped-with-meat.com> Date: Tue, 2 Jun 2015 13:00:30 -0700 (PDT) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=SvUDtp+0 c=1 sm=1 tr=0 a=WkljmVdYkabdwxfqvArNOQ==:117 a=14OXPxybAAAA:8 a=kj9zAlcOel0A:10 a=hOe2yjtxAAAA:8 a=x4qIOkYahUKW4D4qW7gA:9 a=CjuIK1q_8ugA:10 2015-06-02 Roland McGrath * stdlib/setenv.c [__GNUC__,__GNUC_MINOR__ < 4,7]: Use "-Wuninitialized" rather than "-Wmaybe-uninitialized" in pragma. diff --git a/stdlib/setenv.c b/stdlib/setenv.c index 184a8cd..b9e0ba8 100644 --- a/stdlib/setenv.c +++ b/stdlib/setenv.c @@ -24,7 +24,11 @@ there seems to be no way to pacify GCC selectively, only for the place where it's needed. Do not use DIAG_IGNORE_NEEDS_COMMENT here, as it's not defined yet. */ -#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#if ((__GNUC__ << 16) + __GNUC_MINOR__) >= ((4 << 16) + 7) +# pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#else +# pragma GCC diagnostic ignored "-Wuninitialized" +#endif #include #if !_LIBC