From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 A7B993858D3C for ; Fri, 2 Jun 2023 16:53:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A7B993858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685724787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=eZcJ8L8maCvcmyYAsNtzin57hzI225eVBNrryz2LFMQ=; b=E857rXk2/DHidL+e5+ek7XmBqtGVUGSyZ/cbnpCzVw87to4yNKeL+Sd7aXwEiWMllHKu7L GFH+sweKUNSnHkrxgv6yNoxL8cXY8oCqVC39rDfzDKHf9XyBje4X21kPAkzPqk7lsCAy0+ APRTx1P6wxyoN+YMb0eavjGjbzJl3rY= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-548-8rMba1BYMf6GUsfclqbuJQ-1; Fri, 02 Jun 2023 12:53:05 -0400 X-MC-Unique: 8rMba1BYMf6GUsfclqbuJQ-1 Received: by mail-lj1-f199.google.com with SMTP id 38308e7fff4ca-2af17f626e3so19778611fa.0 for ; Fri, 02 Jun 2023 09:53:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685724784; x=1688316784; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eZcJ8L8maCvcmyYAsNtzin57hzI225eVBNrryz2LFMQ=; b=JzlAMlcQ18mYIZBfWFB3ti0oDvDmVf6atQNQJRFq3i2wmnV/DXJIe5KIRbLbCqI6lF 4B7Mpl1Y+1ZUX4IBL/pwx9P78OUbCAMvS08ATZ1bMKZgolv3F45XjxkcmbUzK3SYC41I akG+3Px6H13OqsE9U+gv9zGyT6V4tbnBk4ghulQX75fQaceF16Vnuf+MrxngH0Ibx29l 344LW8cXBFsjOtbsL253LbxoS82EwAJD+nTusz5B5DjnZD5N2yEzP4Zm7g0UfD2m/87D BFa/fDRdvTqj3smSAlLKkr8ybwg6uJWFXzkWka0sW7XbVGWF39rzvNfKoNBlLaP0sN9+ 5zaw== X-Gm-Message-State: AC+VfDxakcgt6Jvrd+R0Ef3pU9ZwFBhnR9BToNSOnxDAGPVthwlyHfH0 gPOEeNxIvQWj4I7WjGD3ylqIDcGn9zigrGTLSjcf5aO18bs9CYQpyDyaJqNgsB4CGCz9bw5q7iK 80C9fuxu2vue8mdyPu0YVamB0sagtshY3Rg== X-Received: by 2002:a05:651c:1030:b0:2a8:adf6:b0e2 with SMTP id w16-20020a05651c103000b002a8adf6b0e2mr400707ljm.13.1685724783936; Fri, 02 Jun 2023 09:53:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ76xgFfJsB+yt+RH0B78dR359vpOztfpAc1MrA1jLCRQbrOhTkKxuTxhWk5xs33OOTQ3ApBkvAQguY+dGJjDuE= X-Received: by 2002:a05:651c:1030:b0:2a8:adf6:b0e2 with SMTP id w16-20020a05651c103000b002a8adf6b0e2mr400697ljm.13.1685724783642; Fri, 02 Jun 2023 09:53:03 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Fri, 2 Jun 2023 17:52:52 +0100 Message-ID: Subject: Re: [PATCH] libstdc++: Do not assume existence of char8_t codecvt facet To: Joseph Faulls Cc: "libstdc++@gcc.gnu.org" , "gcc-patches@gcc.gnu.org" X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="000000000000eb184005fd2862e4" X-Spam-Status: No, score=-13.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --000000000000eb184005fd2862e4 Content-Type: text/plain; charset="UTF-8" On Fri, 2 Jun 2023 at 16:45, Joseph Faulls wrote: > It is not required that codecvt facet be > supported by > > the locale, nor is it added as part of the default locale. This can lead to > > dangerous behaviour when static_cast. > Ouch, yes indeed. I don't know why I added that there. Thanks for the patch, I'll apply it to trunk and gcc-13 ASAP. > > libstdc++-v3/ChangeLog: > > > > * include/bits/locale_classes.tcc: Remove check. > > --- > > libstdc++-v3/include/bits/locale_classes.tcc | 3 --- > > 1 file changed, 3 deletions(-) > > > > diff --git a/libstdc++-v3/include/bits/locale_classes.tcc > b/libstdc++-v3/include/bits/locale_classes.tcc > > index 94838cd7796..2351dd5bcfb 100644 > > --- a/libstdc++-v3/include/bits/locale_classes.tcc > > +++ b/libstdc++-v3/include/bits/locale_classes.tcc > > @@ -129,9 +129,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > > _GLIBCXX_STD_FACET(time_put); > > _GLIBCXX_STD_FACET(messages); > > #endif > > -#ifdef _GLIBCXX_USE_CHAR8_T > > - _GLIBCXX_STD_FACET(codecvt); > > -#endif > > #if __cplusplus >= 201103L > > _GLIBCXX_STD_FACET(codecvt); > > _GLIBCXX_STD_FACET(codecvt); > > -- > > 2.34.1 > --000000000000eb184005fd2862e4--