From patchwork Fri Mar 27 21:17:52 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: 38634 X-Patchwork-Delegate: joseph@codesourcery.com Return-Path: X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 04F43385E010 for ; Fri, 27 Mar 2020 21:18:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 04F43385E010 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02RL4hGf139492 for ; Fri, 27 Mar 2020 17:18:05 -0400 Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0a-001b2d01.pphosted.com with ESMTP id 2ywewya1w3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 27 Mar 2020 17:18:05 -0400 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 02RLFFvE001474 for ; Fri, 27 Mar 2020 21:18:05 GMT Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by ppma03wdc.us.ibm.com with ESMTP id 2ywawan7y2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 27 Mar 2020 21:18:05 +0000 Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 02RLI4fg60097022 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 27 Mar 2020 21:18:04 GMT Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0F490136051 for ; Fri, 27 Mar 2020 21:18:04 +0000 (GMT) Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 856F9136053 for ; Fri, 27 Mar 2020 21:18:03 +0000 (GMT) Received: from brokenarrow.ibmuc.com (unknown [9.85.139.44]) by b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTP for ; Fri, 27 Mar 2020 21:18:03 +0000 (GMT) From: "Paul E. Murphy" To: libc-alpha@sourceware.org Subject: [PATCH v2 01/10] ldbl-128ibm-compat: workaround C++ redirect limitations Date: Fri, 27 Mar 2020 16:17:52 -0500 Message-Id: <20200327211801.31234-2-murphyp@linux.vnet.ibm.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200327211801.31234-1-murphyp@linux.vnet.ibm.com> References: <20200327211801.31234-1-murphyp@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.645 definitions=2020-03-27_08:2020-03-27, 2020-03-27 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 suspectscore=1 spamscore=0 clxscore=1015 malwarescore=0 impostorscore=0 bulkscore=0 phishscore=0 mlxscore=0 adultscore=0 mlxlogscore=876 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003270169 X-Spam-Status: No, score=-26.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 21:18:07 -0000 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. --- 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