From patchwork Wed Aug 9 14:22:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 133284 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2841644vqr; Wed, 9 Aug 2023 07:34:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFaYldFaU4d00m28drXINq3RUn0H5j3JmKuHmgEsbWHSqoGDjYnshDIyQIubtpLNhkPkQRB X-Received: by 2002:a17:907:b0f:b0:973:fd02:a41f with SMTP id h15-20020a1709070b0f00b00973fd02a41fmr1897750ejl.40.1691591675651; Wed, 09 Aug 2023 07:34:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691591675; cv=none; d=google.com; s=arc-20160816; b=CgHbxgnmbiK3uf0EsegrHtnI37ng/Bt5VXAGqjndMcM+Cit8arCuGw7X1CkJ4Q4unY kOTThdgxjibkAhUqAXZHFbS6N5QpN3nbJ1CFwGii67iOVujFkKlX/SxSvi0oqQRAK4R/ siiyXJ3tTt7r18hzuwnziy1U9Jk5G7+PG9YuDq+KhWClrkjAwWwksVAPRPTmnyNAIAod khYNzFvP7o+MtlzDCOK9Yhw3s201r84smaa/wOfowHRvh5Lc7B1oG3L6OpRgWgfQitmI dHV1nAdpQFEPfc0FLq6zhvYjXDsgPnYhon84cwTuPP1ovzMLCtfh9M7KWMAAmCDgVBZQ VNDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=IWWaEE8f55cmY38EEVM8G/bMUC6eCyBQUa+gyrDyvhI=; fh=sC8lnOfyH6gL5FYlMbZ1VDz6qVPMj/3ViLJWKNUCUgQ=; b=pxhfo4OZPw4BIXMwMoK6EKR3pCuxla/RjcjUYyInywp5EiHpH9pwPHHD5ZG8LFifWx BmFMm9Qbgnp/VYnSqZczPLm45T8jpROshpuQdWui83IkDG2t+A7BLREQNNpj36eGUlDe 0PPBVI1/6DtXTP8njEmX1DqlbDkdz77v8ax4Q0ftv85wHcdQLtm+7Sh54XOTMqYh+eKX uid/8kpJroJGixH1KCxGkLK8DiY/CxdrmVqUfZMdeLRIKc80KkPW4qDM6tU+O+gWvTa+ FQxMTBj5iHj75J2+zsu8CVqI8Op3ilGg1xiuEa8DJUQxTK66RXqNoqeEcXGgbkT5WTBO hNkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=I8BEAhjg; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id y9-20020a1709063a8900b00992d262ff61si6046288ejd.989.2023.08.09.07.34.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 07:34:35 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=I8BEAhjg; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6340138313A6 for ; Wed, 9 Aug 2023 14:28:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6340138313A6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691591282; bh=IWWaEE8f55cmY38EEVM8G/bMUC6eCyBQUa+gyrDyvhI=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=I8BEAhjgU7gxo2b2vQFA/qN579OHrjTJjczFrhTSFr1DDj6vFjj3islU4LSU9Cz1f ET/SXI6TuxuP/dIHy1VO9rGtUBxo1p1Y1Aq5hlux06UQIpv+rEKA/rAlL8N6exbKRn AbGV00xrWHpGrDL4Ct+Vljo9npSXcbgqHSZFLxNo= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 2E47638A9082 for ; Wed, 9 Aug 2023 14:26:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2E47638A9082 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-154-fam80WPAOxWtC5dtoEtjBA-1; Wed, 09 Aug 2023 10:23:10 -0400 X-MC-Unique: fam80WPAOxWtC5dtoEtjBA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E689A823D67; Wed, 9 Aug 2023 14:22:46 +0000 (UTC) Received: from localhost (unknown [10.42.28.187]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7DFE25CC02; Wed, 9 Aug 2023 14:22:46 +0000 (UTC) To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Suppress clang -Wc99-extensions warnings in Date: Wed, 9 Aug 2023 15:22:41 +0100 Message-ID: <20230809142245.1015025-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773762432686746475 X-GMAIL-MSGID: 1773762432686746475 Tested x86_64-linux. Pushed to trunk. -- >8 -- This prevents Clang from warning about the use of the non-standard __complex__ keyword. libstdc++-v3/ChangeLog: * include/std/complex: Add diagnostic pragma for clang. --- libstdc++-v3/include/std/complex | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libstdc++-v3/include/std/complex b/libstdc++-v3/include/std/complex index 0ba2167bf02..a4abe9aa96a 100644 --- a/libstdc++-v3/include/std/complex +++ b/libstdc++-v3/include/std/complex @@ -47,6 +47,11 @@ // Get rid of a macro possibly defined in #undef complex +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wc99-extensions" +#endif + #if __cplusplus > 201703L # define __cpp_lib_constexpr_complex 201711L #endif @@ -2642,4 +2647,8 @@ _GLIBCXX_END_NAMESPACE_VERSION #endif // C++11 +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + #endif /* _GLIBCXX_COMPLEX */