Message ID | 20220724043902.1777378-1-tom@honermann.net |
---|---|
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f503:0:0:0:0:0 with SMTP id q3csp905217wro; Sat, 23 Jul 2022 21:40:09 -0700 (PDT) X-Google-Smtp-Source: AGRyM1un1orMGe4MtJuBJ6bJgVTINVLwFtriBMzT7VmG+csl5UzCJj6M3TZCR4QRkARrlBJ+uyaS X-Received: by 2002:a05:6402:350a:b0:43a:a486:102e with SMTP id b10-20020a056402350a00b0043aa486102emr7186151edd.372.1658637609530; Sat, 23 Jul 2022 21:40:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658637609; cv=none; d=google.com; s=arc-20160816; b=C7dtqjWU2ax0VCJ+MGT7EypmVHePOmKaimPmnpd6M41C2jUWdqRp39sznZKJidXnAU /g4W6jDz07DEWpmf0v/MWd6yMoPCVvOIjfe80/Nk/xOnUqbPN/RxuSegcr5HZaqsMUcY wg96vp8hy6e9btOEcyRqHgW2ZDQeFbg/zk4J6otQlwKopKeOEKjUVLLJjI4q0oH8tPG4 1f/GGe12HVC6A0+aZ0GxqLyoBTTiUxAYcSjHIgY+ax5WkqsWzaCrMEsqm2m/1/bK39uZ EcXziwqLmPQEoZajK+9L0Q1Nb5Hdr/QlTBdWUFz3ACWD6P7K10UBQ0ZuAYUuoBdT10je B5aw== 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=XsWnCD7emsJCFZhFkdCI7HMYJOjzq+FVliA6teBNoeQ=; b=ZNppdtEbTmecxBBjnoqCRwZpDn92w5ewmrrY1P/p7SrzHgCKrUowNhxUAJi0QqyNwe uv7xMrEsMncEL6O+DKplC3+EEkIxpnIXGTroF6pbbILihcYBZzf/I9HeZReqSk/reOCb CfKzYvph1P1p7GaJT041IokYfrbci8YlBF+V8+lXjw3N6yFerDchjwN4sVk03Kj6ZPCp EYNU90oXqZ1iIw4K0WwjJ9DyNr7+l1o86nztdYQL2UZOB248POa80c3L0mRGEglb1/jX e4ZcuzgBC8qX90vLGKFRSHjwtP5wF4yqd/mouOpcaStBDfqOlktNWSQOsr460st8Sn/8 4cxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=NEPlDglr; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id sh41-20020a1709076ea900b0072f255f1708si11326261ejc.125.2022.07.23.21.40.09 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Jul 2022 21:40:09 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=NEPlDglr; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 1CE1F3857C67 for <ouuuleilei@gmail.com>; Sun, 24 Jul 2022 04:40:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1CE1F3857C67 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1658637608; bh=XsWnCD7emsJCFZhFkdCI7HMYJOjzq+FVliA6teBNoeQ=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=NEPlDglrEUZDpvMYzJJw57Oa2B4gD6N/Rxb3oEHt4k7XArnfkPohvS4xFhexmSBzm 9sguWtOGOsWe9Gm49nclAazq/JtwNJFLWz1JjtuhgiM0X9oAjUYHlyUWXCWEtaQVCN XqtiDsRdUStf1lW4STyLQ0TIpn410QIv9fB8EIJ0= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp127.ord1c.emailsrvr.com (smtp127.ord1c.emailsrvr.com [108.166.43.127]) by sourceware.org (Postfix) with ESMTPS id 8EA9E385840A for <gcc-patches@gcc.gnu.org>; Sun, 24 Jul 2022 04:39:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8EA9E385840A X-Auth-ID: tom@honermann.net Received: by smtp24.relay.ord1c.emailsrvr.com (Authenticated sender: tom-AT-honermann.net) with ESMTPSA id 81BAB6010B; Sun, 24 Jul 2022 00:39:23 -0400 (EDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH 0/1] c++/106423: Fix pragma suppression of -Wc++20-compat diagnostics Date: Sun, 24 Jul 2022 00:39:01 -0400 Message-Id: <20220724043902.1777378-1-tom@honermann.net> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Classification-ID: 41aea723-eb08-47ec-8fe6-68f417a64c83-1-1 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Tom Honermann via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Tom Honermann <tom@honermann.net> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1739207590455104647?= X-GMAIL-MSGID: =?utf-8?q?1739207590455104647?= |
Series |
c++/106423: Fix pragma suppression of -Wc++20-compat diagnostics
|
|
Message
Li, Pan2 via Gcc-patches
July 24, 2022, 4:39 a.m. UTC
This change addresses the following issue raised on the libc-alpha mailing list: https://sourceware.org/pipermail/libc-alpha/2022-July/140825.html Glibc 2.36 adds a char8_t typedef in C++ modes that do not enable the char8_t builtin type (C++17 and earlier by default; subject to _GNU_SOURCE and use of the -f[no-]char8_t option). When -Wc++20-compat diagnostics are enabled, the following warning is issued from the glibc uchar.h header. warning: identifier ‘char8_t’ is a keyword in C++20 [-Wc++20-compat] Such diagnostics are not desired from system headers, so glibc would like to suppress the diagnostic using '#pragma GCC diagnostic ignored "-Wc++20-compat"', but attempting to do so currently fails. This patch corrects that. Tom Honermann (1): c++/106423: Fix pragma suppression of -Wc++20-compat diagnostics. gcc/c-family/c-opts.cc | 7 +++++++ gcc/c-family/c.opt | 2 +- gcc/testsuite/g++.dg/cpp0x/keywords2.C | 16 ++++++++++++++++ gcc/testsuite/g++.dg/cpp2a/keywords2.C | 13 +++++++++++++ libcpp/include/cpplib.h | 4 ++++ libcpp/init.cc | 1 + 6 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/g++.dg/cpp0x/keywords2.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/keywords2.C