On Thu, Nov 23, 2023 at 12:09:05AM +, Joseph Myers wrote:
> OK with tests added for unsigned _BitInt(1). Specifically, unsigned
> _BitInt(1) is a bit of a degenerate case for stdc_bit_ceil (always
> returning 1 after evaluating the argument's side effects); I think the
> code that builds of
On Mon, 20 Nov 2023, Jakub Jelinek wrote:
> On Mon, Nov 20, 2023 at 04:03:07PM +0100, Jakub Jelinek wrote:
> > > Note that stdc_bit_ceil now has defined behavior (return 0) on overflow:
> > > CD2 comment FR-135 was accepted for the DIS at the June WG14 meeting.
> > > This affects both the docum
On Mon, 20 Nov 2023, Jakub Jelinek wrote:
> > Note that stdc_bit_ceil now has defined behavior (return 0) on overflow:
> > CD2 comment FR-135 was accepted for the DIS at the June WG14 meeting.
> > This affects both the documentation and the implementation, as they need
> > to avoid an undefine
On Mon, Nov 20, 2023 at 04:29:47PM +0100, Jakub Jelinek wrote:
> On Mon, Nov 20, 2023 at 04:03:07PM +0100, Jakub Jelinek wrote:
> > > Note that stdc_bit_ceil now has defined behavior (return 0) on overflow:
> > > CD2 comment FR-135 was accepted for the DIS at the June WG14 meeting.
> > > This af
On Mon, Nov 20, 2023 at 04:03:07PM +0100, Jakub Jelinek wrote:
> > Note that stdc_bit_ceil now has defined behavior (return 0) on overflow:
> > CD2 comment FR-135 was accepted for the DIS at the June WG14 meeting.
> > This affects both the documentation and the implementation, as they need
> >
On Mon, Nov 20, 2023 at 02:55:33PM +, Joseph Myers wrote:
> On Sat, 18 Nov 2023, Jakub Jelinek wrote:
>
> > +@defbuiltin{@var{type} __builtin_stdc_bit_ceil (@var{type} @var{arg})}
> > +The @code{__builtin_stdc_bit_ceil} function is available only
> > +in C. It is type-generic, the argument ca
On Mon, Nov 20, 2023 at 02:55:33PM +, Joseph Myers wrote:
> On Sat, 18 Nov 2023, Jakub Jelinek wrote:
>
> > +@defbuiltin{@var{type} __builtin_stdc_bit_ceil (@var{type} @var{arg})}
> > +The @code{__builtin_stdc_bit_ceil} function is available only
> > +in C. It is type-generic, the argument ca
On Sat, 18 Nov 2023, Jakub Jelinek wrote:
> +@defbuiltin{@var{type} __builtin_stdc_bit_ceil (@var{type} @var{arg})}
> +The @code{__builtin_stdc_bit_ceil} function is available only
> +in C. It is type-generic, the argument can be any unsigned integer
> +(standard, extended or bit-precise). No in
Hi!
For these 3 type-generic macros I'm out of ideas how to satisfy
all the requirements (no use of ({ ... }), not expanding argument multiple
times, not evaluating side-effects multiple times using some small building
blocks, so the following patch introduces 3 new C only builtins which
can be us