public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Stephan Bergmann <sbergman@redhat.com>
Cc: libstdc++@gcc.gnu.org, Jonathan Wakely <jwakely@redhat.com>,
	gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] libstdc++: Make chrono::hh_mm_ss more compact
Date: Mon, 12 Dec 2022 14:06:34 +0000	[thread overview]
Message-ID: <CAH6eHdRT66fkfcsQPojYhXCfT+QpEqFq28fyQW1Qj2di6q=wmQ@mail.gmail.com> (raw)
In-Reply-To: <CAH6eHdQVtF0mPnx6NQnsmgiFdhu2EJ9ddJmS60yPZwtcURGGmQ@mail.gmail.com>

On Mon, 12 Dec 2022 at 11:18, Jonathan Wakely wrote:
>
> On Mon, 12 Dec 2022 at 07:12, Stephan Bergmann via Libstdc++
> <libstdc++@gcc.gnu.org> wrote:
> >
> > On 11/21/22 21:43, Jonathan Wakely via Libstdc++ wrote:
> > > +     static constexpr bool __is_unsigned
> > > +       = __and_v<is_integral<typename _Duration::rep>,
> > > +                 is_unsigned<typename _Duration::rep>>;
> >
> > 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

  reply	other threads:[~2022-12-12 14:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21 20:43 Jonathan Wakely
2022-12-06 21:40 ` Jonathan Wakely
2022-12-12  7:10 ` Stephan Bergmann
2022-12-12 11:18   ` Jonathan Wakely
2022-12-12 14:06     ` Jonathan Wakely [this message]
2022-12-12 16:30     ` Stephan Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH6eHdRT66fkfcsQPojYhXCfT+QpEqFq28fyQW1Qj2di6q=wmQ@mail.gmail.com' \
    --to=jwakely.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jwakely@redhat.com \
    --cc=libstdc++@gcc.gnu.org \
    --cc=sbergman@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).