From patchwork Fri Mar 6 20:37:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. Murphy" X-Patchwork-Id: 1250611 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-110373-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha1 header.s=default header.b=ez/6iYIg; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48YzvZ3SXcz9sNg for ; Sat, 7 Mar 2020 07:37:46 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; q=dns; s= default; b=N/HpPsXAwmbAAxIRQBLl5N0FkjS33b2/xsRU3zNcrrqlW21PJIRj8 sIPgqY97nIKtJ1Fnqcf+Bv+kiyhRA9gzA63NsndaGzWVaUqCzyAUcEt/1TO3Fm+N qkrDvlAJwPUMPAJuNZXAR21bu/3PJpqvmNW0eXmPS1X8sW12v+Du74= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; s=default; bh=H5ip7EprTVjSEI5mAaV4KOJHde8=; b=ez/6iYIg9Oy/5rH5/+pb+GdwDl9y ncVZn78gA9zMXZGXrLz0Q5Vfkr2uZUW2QldOoQj+6BjN3nZAelJiRJWP2fiWgB2I XpdqsThIU7zSK0K87o5UhMKkG1SpTig/0JGfcc6KnaJLXCwhQSdl/sgBeD17y4sg 38tA+l7Nh0NiXvk= Received: (qmail 2970 invoked by alias); 6 Mar 2020 20:37:29 -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 2951 invoked by uid 89); 6 Mar 2020 20:37:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy= X-HELO: mx0a-001b2d01.pphosted.com From: "Paul E. Murphy" To: libc-alpha@sourceware.org Subject: [PATCH 03/13] RFC: ldbl-128ibm-compat: workaround C++ redirect limitations Date: Fri, 6 Mar 2020 14:37:11 -0600 Message-Id: <20200306203721.15886-4-murphyp@linux.vnet.ibm.com> In-Reply-To: <20200306203721.15886-1-murphyp@linux.vnet.ibm.com> References: <20200306203721.15886-1-murphyp@linux.vnet.ibm.com> MIME-Version: 1.0 GCC 8+ is more pedantic about type checking the redirect declarations for non-system headers. I am not sure if there is less obtrusive way to dodge these warnings when building C++ tests using the headers from the glibc under construction. Does a better option than explicitly specifying these headers via the #pragma GCC system_header? --- include/monetary.h | 8 ++++++++ include/printf.h | 8 ++++++++ include/stdio.h | 10 ++++++++++ include/stdlib.h | 9 +++++++++ include/wchar.h | 9 +++++++++ 5 files changed, 44 insertions(+) diff --git a/include/monetary.h b/include/monetary.h index 240925e87d..81933a2c5e 100644 --- a/include/monetary.h +++ b/include/monetary.h @@ -1,3 +1,11 @@ +/* This is needed to keep GCC >= 9 happy when using redirects inside system + headers. glibc builds some C++ tests which use these headers which do + not get marked as system headers. */ +#include +#if defined __cplusplus && __LONG_DOUBLE_USES_FLOAT128 == 1 +# pragma GCC system_header +#endif + #include #ifndef _ISOMAC #include diff --git a/include/printf.h b/include/printf.h index d051514119..9e74e35678 100644 --- a/include/printf.h +++ b/include/printf.h @@ -1,5 +1,13 @@ #ifndef _PRINTF_H +/* This is needed to keep GCC >= 9 happy when using redirects inside system + headers. glibc builds some C++ tests which use these headers which do + not get marked as system headers. */ +#include +#if defined __cplusplus && __LONG_DOUBLE_USES_FLOAT128 == 1 +# pragma GCC system_header +#endif + #include # ifndef _ISOMAC diff --git a/include/stdio.h b/include/stdio.h index 6718af4108..517d53837f 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -2,8 +2,18 @@ # if !defined _ISOMAC && defined _IO_MTSAFE_IO # include # endif + +/* This is needed to keep GCC >= 9 happy when using redirects inside system + headers. glibc builds some C++ tests which use these headers which do + not get marked as system headers. */ +# include +# if defined __cplusplus && __LONG_DOUBLE_USES_FLOAT128 == 1 +# pragma GCC system_header +# endif + # include # ifndef _ISOMAC + # define _LIBC_STDIO_H 1 # include diff --git a/include/stdlib.h b/include/stdlib.h index 926f965f69..7929e45386 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -3,6 +3,15 @@ #ifndef _ISOMAC # include #endif + +/* This is needed to keep GCC >= 9 happy when using redirects inside system + headers. glibc builds some C++ tests which use these headers which do + not get marked as system headers. */ +#include +#if defined __cplusplus && __LONG_DOUBLE_USES_FLOAT128 == 1 +# pragma GCC system_header +#endif + #include /* Now define the internal interfaces. */ diff --git a/include/wchar.h b/include/wchar.h index 617906eb14..64355dd6fb 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -1,4 +1,13 @@ #ifndef _WCHAR_H + +/* This is needed to keep GCC >= 9 happy when using redirects inside system + headers. glibc builds some C++ tests which use these headers which do + not get marked as system headers. */ +# include +# if defined __cplusplus && __LONG_DOUBLE_USES_FLOAT128 == 1 +# pragma GCC system_header +# endif + # include # ifndef _ISOMAC