From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by sourceware.org (Postfix) with ESMTPS id 94275383F209; Mon, 12 Dec 2022 14:06:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 94275383F209 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-ed1-x52f.google.com with SMTP id m19so12980497edj.8; Mon, 12 Dec 2022 06:06:46 -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=lRoa/ZxMHFGaozxIkUMvB7G42UfEaOXRP1PEvqj6iBU=; b=V/1ehSn+u5zMt9WZS11kb/0uYaeJWxWsc/+2wjpKSbQVlmGPoRPoRxdgUbgypHW7SY Yfw7ZoakNxlbsdj2Rat++uy3rH5cdJ7FCQuHw1PUOn/RYZQwMLrAalaaZDNl5iN3BveE KhlrfiBHQqwg496egOzIxoDO6dd5Imipz9uHOmnC9CuROmfbnACChkvSSFVj93cQCZxx w5DZVt5ur89DwWzhgTCka+fkSD9QJjvRXM97YyZCaZe4F6+S6j0BGd8TNyNVX+DT/TT6 cU242fMed/eqi7KEiPyR8hlHAcdEtwLY8nbn3lqyXs2JO1reKn+FQ9tNDm7Y5ccH9J3b lEVQ== 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=lRoa/ZxMHFGaozxIkUMvB7G42UfEaOXRP1PEvqj6iBU=; b=CIUVid5ZLNXItrulIFbhRPZFspkWwvIxH1qtwZMcutOwPfLWNfNWGPllKPyOVkiCyk yLMAtHf6G32TT1Go2fP47j7H0QQxX9D+bJ9UAGbrBxvieOF02in2ByQtAMcuIjgT9Rmt Zkls5iTfavdSnEHNHTkxh1pUw/jEpb/LazLGJcg5hTcQJPP7D8ql9j/dhl6AsvE4JgL7 am6V8iNBDv8fSIDPwO7Rlnqb9uglgUIR6v9Ms6rbRETwDhqjezhyJnF2nPMxHl7pG/R6 Oj1EncJ95FEnCxzBdsbXnMpTIHvNppfKAB9xGrbZFcyywh+y5eBIHXhUbtQMoHYRCNTU pPiw== X-Gm-Message-State: ANoB5pnCU9Z4q6iHlyuLNS/L/4Mv/Aoh+L/kk+SVcAUwud83X9nqALIn wrZNheCCcGcP8w0ZrS7hwjv2rL2AtuMpYvmImmY= X-Google-Smtp-Source: AA0mqf4N6KUJzk3+e1ZV07HgAohNZ5Kv6hxviB/q0gu1r+jd/b0nF31p7HDLVIGi+zonS9A6/GBWw19OT0nd9ZwE5So= X-Received: by 2002:aa7:c94a:0:b0:46b:74e1:872c with SMTP id h10-20020aa7c94a000000b0046b74e1872cmr37752217edt.301.1670854005292; Mon, 12 Dec 2022 06:06:45 -0800 (PST) MIME-Version: 1.0 References: <20221121204341.2024118-1-jwakely@redhat.com> <39dc640b-e46d-8694-8056-7792127a97c8@redhat.com> In-Reply-To: From: Jonathan Wakely Date: Mon, 12 Dec 2022 14:06:34 +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.7 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 11:18, Jonathan Wakely wrote: > > 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. The __is_unsigned use has been removed in r13-4613-gcb363fd9f19eb7