[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Skip initial expansion of valid array reference tokens in un
From: |
konsolebox |
Subject: |
Re: [PATCH] Skip initial expansion of valid array reference tokens in unset |
Date: |
Tue, 20 Apr 2021 08:13:50 +0800 |
On Tue, Apr 20, 2021 at 2:08 AM Koichi Murase <myoga.murase@gmail.com> 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 unsigned integers is defined to
> be made by mod 2^{32} (when int is 32 bits).
Not sure how this should be done right so I decided to just change
'flags' to unsigned int.
- int flags; /* Flags associated with this word. */
+ unsigned int flags; /* Flags associated with this word. */
> `y.tab.c' is automatically generated from `parse.y'. You should edit
> `parse.y' instead of `y.tab.c'
I also modified parse.y. All changes made so far can be seen in
https://git.io/JOam0.
Thanks for the tips.
--
konsolebox