On 4/19/21 11:09 AM, konsolebox wrote:
Attached patch demonstrates a solution that solves the current issues
of unset discussed in
https://lists.gnu.org/archive/html/bug-bash/2021-03/msg00056.html
while avoiding breakage of scripts and keeping the expansion of
subscripts consistent with expansion
On Tue, Apr 20, 2021 at 9:35 AM Koichi Murase wrote:
> In addition, you need to change `1 << 31' to `1u << 31'. The literal
> `1' has the type `(signed) int'. One needs to use `1u'---the literal
> of the type `unsigned int'.
I see, but I think I'll just skip that as I would also have to modify
2021年4月20日(火) 9:14 konsolebox :
> On Tue, Apr 20, 2021 at 2:08 AM Koichi Murase wrote:
> > AFAIK `1 << 31' causes undefined behavior when int is 32-bit signed
> > integer. Instead, I think you may write `(int)(1u << 31)' for
> > conforming C compilers. `u << 31' is defined for unsigned integers,
On Tue, Apr 20, 2021 at 2:08 AM Koichi Murase wrote:
> AFAIK `1 << 31' causes undefined behavior when int is 32-bit signed
> integer. Instead, I think you may write `(int)(1u << 31)' for
> conforming C compilers. `u << 31' is defined for unsigned integers,
> and the conversion between signed and
2021年4月20日(火) 0:16 konsolebox :
> Attached patch demonstrates a solution that solves the current issues
> of unset discussed in
> https://lists.gnu.org/archive/html/bug-bash/2021-03/msg00056.html
> while avoiding breakage of scripts and keeping the expansion of
> subscripts consistent with expansio