From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x2e.google.com (mail-oa1-x2e.google.com [IPv6:2001:4860:4864:20::2e]) by sourceware.org (Postfix) with ESMTPS id 4324E3858D37 for ; Wed, 20 Jul 2022 14:31:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4324E3858D37 Received: by mail-oa1-x2e.google.com with SMTP id 586e51a60fabf-10d867a8358so2060420fac.10 for ; Wed, 20 Jul 2022 07:31:12 -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=0Wg1bI7Q3Cq3WeMXmbGBo6/Vyf9d0ecY0yuaTFJSMIM=; b=IL7Pc7R6HXwkkM8TlcLfNwiX3O2TSI+1MAw4ATiV2JYnvm/NKXLYD0R/N8hUHceSpX bj0g7BPBKvBwMReTDVzTSchkUluTCCLNOd0En7AZFtLPIPlNSo+FoV3aCRGuxIQ6uedm XJjerhHAl55smti6LA9hzB/l599coUDbwnPcEwQ7JuMc4QPuJBfQbHIAiuLwzhipymvX rtMgad9f0BC8JnNgs5BFWmlwU/Al1PbZKQ37flzA9HNiy/1W/ZUPCf+hpLHtYP5ir22m NmpyFXulsB+H3fQZ83SQ3nJu2wE8tv4yBVXCMDxDCmLEggzSJw5bTokT2Y0NBOlbCfTV M4XQ== X-Gm-Message-State: AJIora9CUCyuA1ltDvif08vVo96Qhr919gkYFFwq22ml0Bkk2sJegrA1 9iFqm2kvkfkUrzbBeZHFeMRHeQ== X-Google-Smtp-Source: AGRyM1szY8Q3PWrNZ/Kmf9aMFDvLyzf81TTMsTQoVpSch67hfL+WvmT4dCx1eiudANrex4G/qb9nIw== X-Received: by 2002:a05:6870:2326:b0:f1:7485:2a92 with SMTP id w38-20020a056870232600b000f174852a92mr2649400oao.291.1658327471499; Wed, 20 Jul 2022 07:31:11 -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 e135-20020a4a558d000000b0041ba884d42csm7412419oob.42.2022.07.20.07.31.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 20 Jul 2022 07:31:11 -0700 (PDT) Message-ID: Date: Wed, 20 Jul 2022 11:31:08 -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: Florian Weimer , Adhemerval Zanella Netto via Libc-alpha Cc: Joseph Myers , Tom Honermann References: <20220630125215.6052-1-tom@honermann.net> <20220630125215.6052-3-tom@honermann.net> <5bcf2650-0cf0-6f67-a532-b47e3daffdda@linaro.org> <878ronlwiy.fsf@oldenburg.str.redhat.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <878ronlwiy.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.0 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 14:31:13 -0000 On 20/07/22 10:54, Florian Weimer wrote: > * Adhemerval Zanella Netto via Libc-alpha: > >> 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? > > I think __cpp_char8_t is only defined if the language mode is active. > The warning is independent of the language mode, though. Maybe we also skip chat8_t definition for __cplusplus == 202002L ?