From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x35.google.com (mail-oa1-x35.google.com [IPv6:2001:4860:4864:20::35]) by sourceware.org (Postfix) with ESMTPS id A9B803858D37 for ; Wed, 20 Jul 2022 12:04:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A9B803858D37 Received: by mail-oa1-x35.google.com with SMTP id 586e51a60fabf-10d6e8990b9so7650742fac.7 for ; Wed, 20 Jul 2022 05:04:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=RDE99+g8+lK33pepqVB34/+VcotkKg4i5+GFmn2d2kg=; b=K8Do24sPerF63MXDT8G4iZfwaAKJyU/4bCP2QzYzxpbvYzVYXzEEtS9kITxbAOLbzZ 4R3+d/L+87hruPu8DT4o8EMeGimZ6UhsXyCbiEmpnHAxAlqnNB64DwDOL25dTPrFOWsr XPyEk9liKEEcL40n0DX5TkcijFKvKjRFjOESLuEGSlyBppJEuPD1T5xu1kVheCwJFbSa ONMlfjsrSxNX024nhGE4Y0CKz6z9SI7OxcuVhJmsWD4Cj8/EJjtUbOjN8NiODtiztsv3 1rcs8YE/kleGMBlGAJdwfHf4KXy+4h+kKieSd8hQsGEdy80osN8zgNuw0XoByV7ClZyz 9mKw== X-Gm-Message-State: AJIora9twIehdfwtujVesqks+LCv0v5bJK+MnEmEuC1F/1ltWzYdsDnm TNToPWUYD1twQ0JoN1LiR2BxulnxVMbVnA== X-Google-Smtp-Source: AGRyM1sJshXjoS+IxdBzZ3kYXxjE86be7tDejrRwEouGBh4lbkmWKXclKcrF1UezZw7UFcr4YSp2zQ== X-Received: by 2002:a05:6870:c0d2:b0:10d:7752:e02e with SMTP id e18-20020a056870c0d200b0010d7752e02emr2273265oad.236.1658318647509; Wed, 20 Jul 2022 05:04:07 -0700 (PDT) Received: from ?IPV6:2804:431:c7cb:8ded:dd7a:8a21:1a2b:76c5? ([2804:431:c7cb:8ded:dd7a:8a21:1a2b:76c5]) by smtp.gmail.com with ESMTPSA id n45-20020a4a9570000000b0042313f42b26sm7089415ooi.39.2022.07.20.05.04.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 20 Jul 2022 05:04:07 -0700 (PDT) Message-ID: <5bcf2650-0cf0-6f67-a532-b47e3daffdda@linaro.org> Date: Wed, 20 Jul 2022 09:04:02 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.0.2 Subject: Re: [PATCH v4 2/3] stdlib: Implement mbrtoc8(), c8rtomb(), and the char8_t typedef. Content-Language: en-US To: Joseph Myers Cc: Tom Honermann , libc-alpha@sourceware.org References: <20220630125215.6052-1-tom@honermann.net> <20220630125215.6052-3-tom@honermann.net> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, 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: 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: Wed, 20 Jul 2022 12:04:19 -0000 On 19/07/22 18:08, Joseph Myers wrote: > This change appears to introduce a failure of > wcsmbs/check-installed-headers-cxx with GCC mainline, because uchar.h now > produces: > > ../wcsmbs/uchar.h:38:23: error: identifier 'char8_t' is a keyword in C++20 [-Werror=c++20-compat] > 38 | typedef unsigned char char8_t; > > (recall we want our installed headers to avoid warnings *without* relying > on the default disabling of warnings in system headers). > > Unfortunately, GCC for C++ doesn't disable -Wc++20-compat inside > __extension__ (unlike what the C front end does), so simply adding > __extension__ to that declaration wouldn't help, but we could use > diagnostic disabling pragmas (as already done in some installed headers). > My understanding is compiler will define __cpp_char8_t exactly to avoid such redefinition. But it seems from gcc documentation that it is only actually enabled with -fchar8_t. Do we a preprocessor flag to indicate it?