From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by sourceware.org (Postfix) with ESMTPS id 3729239A7901; Mon, 12 Dec 2022 11:18:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3729239A7901 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x62e.google.com with SMTP id b2so27053889eja.7; Mon, 12 Dec 2022 03:18:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=NFo0q1wO6UL4S6TXpUk99KQDijIgqTMTtO2MqFix+Xk=; b=mu0saX5yg77pPPeKxEPMVqdjW7iJwl0AbCuZI+K5Y4StnInwk4kBzqT28+o8Y13XWD lZkdejYhKke0fG7x5hW716Pviiu+zNo1xGPfhYjGmtbyf6BoK+ji/urMU0XFI5D1GGSH P6XVihAw87sg5kLCZZQsoqEyg7zFVU+97CcE5hsPFatqUjt4txV1H5Apkchlsx3dK7R0 asHe65czuj6wbVnE0+cPAA9LfwI4oNSZq76KDBMDfK1ExrAMNcliSk42Ls3yOkKKS5XJ bWx6HSKgP8VsZel1J2ErxiKwnT9DfoMlJavOF7kFIuhUwqEdqm1lQZYnbc3h6ohCj3mU Z33w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=NFo0q1wO6UL4S6TXpUk99KQDijIgqTMTtO2MqFix+Xk=; b=a0+9QY5IgnQcs3q5QmG2sGpHkmFbxRepf9d+ZGdbMFRpdxYlKiA+NLMRa7dSpoF78x tcqT/LT9/5XlbxWvIbtfVdyWuOj2HIMT8QF92IORUMrKYQ5oZX1MyUobtz41V15vKeDv o66+UiILoMZ7IjTMBAMENwkA90pZneJnFMsQp5u5VOqpy/tz3olBbOJemT0FRU9LvUax SCInTAd73cTzIFlAKKdudoEJsNc1AWOPp79gdQft2XjPDIagtL1pPiBUgfKAxepNCuNw XHIQFGGn3AP6OnaV53nEUNn+cznM+wBWC4Vbj/uVju+AAmeHIZ1asCgw6ksDvYZ2uuwZ 8wpw== X-Gm-Message-State: ANoB5pkzJbjPXBGhpdiHUt6uMGlW/U/dCgM2p+xKh61w82K7/x6qxMx7 GsokC1xftQZR6eJ8tEGuLRIdLWARqLzUje5em9I= X-Google-Smtp-Source: AA0mqf6eK5WkI5GnVOPEiqURRQgX1JHWnsjtL3iugODmXtSFEnUsQGS5Eh8ssNSsGVOfsY9jHYEZUsPdnoG38xkRAzs= X-Received: by 2002:a17:906:518c:b0:7c1:98f:c16a with SMTP id y12-20020a170906518c00b007c1098fc16amr10096921ejk.215.1670843926906; Mon, 12 Dec 2022 03:18:46 -0800 (PST) MIME-Version: 1.0 References: <20221121204341.2024118-1-jwakely@redhat.com> <39dc640b-e46d-8694-8056-7792127a97c8@redhat.com> In-Reply-To: <39dc640b-e46d-8694-8056-7792127a97c8@redhat.com> From: Jonathan Wakely Date: Mon, 12 Dec 2022 11:18:35 +0000 Message-ID: Subject: Re: [PATCH] libstdc++: Make chrono::hh_mm_ss more compact To: Stephan Bergmann Cc: libstdc++@gcc.gnu.org, Jonathan Wakely , gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,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 List-Id: On Mon, 12 Dec 2022 at 07:12, Stephan Bergmann via Libstdc++ wrote: > > On 11/21/22 21:43, Jonathan Wakely via Libstdc++ wrote: > > + static constexpr bool __is_unsigned > > + = __and_v, > > + is_unsigned>; > > Using `__is_unsigned` as an identifier here causes compilation issues > with Clang, which predefines that as a builtin predicate. Great, those are going to break a lot of code: include/bits/charconv.h: = ! __gnu_cxx::__int_traits<_Tp>::__is_signed; include/bits/locale_facets.tcc: (__negative && __num_traits::__is_signed) include/bits/locale_facets.tcc: if (__negative && __num_traits::__is_signed) include/bits/locale_facets.tcc: && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) include/bits/uniform_int_dist.h: static_assert(!_Up_traits::__is_signed, "U must be unsigned"); include/bits/uniform_int_dist.h: static_assert(!_Wp_traits::__is_signed, "W must be unsigned"); include/ext/numeric_traits.h: static const bool __is_signed = (_Value)(-1) < 0; include/ext/numeric_traits.h: = __is_integer_nonstrict<_Value>::__width - __is_signed; include/ext/numeric_traits.h: static const _Value __max = __is_signed include/ext/numeric_traits.h: static const _Value __min = __is_signed ? -__max - 1 : (_Value)0; include/ext/numeric_traits.h: const bool __numeric_traits_integer<_Value>::__is_signed; include/ext/numeric_traits.h: static const bool __is_signed = true; include/ext/numeric_traits.h: const bool __numeric_traits_floating<_Value>::__is_signed; include/ext/numeric_traits.h: static const bool __is_signed = true; include/ext/numeric_traits.h: static const bool __is_signed = true; If Clang already treats __is_signed as a conditionally-active built-in, it should do the same for __is_unsigned.