Re: [PATCH] handle folded nonconstant array bounds [PR101702]

2021-11-17 Thread Marek Polacek via Gcc-patches
On Tue, Nov 16, 2021 at 05:32:00PM -0700, Martin Sebor via Gcc-patches wrote: > -Warray-parameter and -Wvla-parameter assume that array bounds > in function parameters are either constant integers or variable, > but not something in between like a cast of a constant that's > not recognized as an

[PATCH] handle folded nonconstant array bounds [PR101702]

2021-11-16 Thread Martin Sebor via Gcc-patches
-Warray-parameter and -Wvla-parameter assume that array bounds in function parameters are either constant integers or variable, but not something in between like a cast of a constant that's not recognized as an INTEGER_CST until we strip the cast from it. This leads to an ICE as the the internal