https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115626
Andrew Pinski changed:
What|Removed |Added
Resolution|--- |DUPLICATE
Status|UNCONFIRME
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115626
--- Comment #3 from Andrew Pinski ---
(In reply to Andrew Pinski from comment #2)
> You can always do `~(cast)0` too.
That is:
__uint128_t t = ~(__uint128_t)0;
does not warn.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115626
--- Comment #2 from Andrew Pinski ---
>may not work reliably for types for which no literal suffixes exist (e.g.:
>extended integer types)
You can always do `~(cast)0` too.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115626
--- Comment #1 from Andrew Pinski ---
-1ul and ~0ul are portable by the way.