Re: [PATCH] core-parking: fix build with gcc12 and NR_CPUS=1

2022-09-09 Thread Jan Beulich
On 09.09.2022 14:27, Julien Grall wrote: > Hi, > > On 09/09/2022 13:14, Jan Beulich wrote: >> On 09.09.2022 13:00, Julien Grall wrote: >>> On 09/09/2022 11:18, Jan Beulich wrote: Gcc12 takes issue with core_parking_remove()'s for ( ; i < cur_idle_nums; ++i )

Re: [PATCH] core-parking: fix build with gcc12 and NR_CPUS=1

2022-09-09 Thread Julien Grall
Hi, On 09/09/2022 13:14, Jan Beulich wrote: On 09.09.2022 13:00, Julien Grall wrote: On 09/09/2022 11:18, Jan Beulich wrote: Gcc12 takes issue with core_parking_remove()'s for ( ; i < cur_idle_nums; ++i ) core_parking_cpunum[i] = core_parking_cpunum[i + 1]; complaining that

Re: [PATCH] core-parking: fix build with gcc12 and NR_CPUS=1

2022-09-09 Thread Jan Beulich
On 09.09.2022 13:00, Julien Grall wrote: > On 09/09/2022 11:18, Jan Beulich wrote: >> Gcc12 takes issue with core_parking_remove()'s >> >> for ( ; i < cur_idle_nums; ++i ) >> core_parking_cpunum[i] = core_parking_cpunum[i + 1]; >> >> complaining that the right hand side array access

Re: [PATCH] core-parking: fix build with gcc12 and NR_CPUS=1

2022-09-09 Thread Julien Grall
Hi Jan, On 09/09/2022 11:18, Jan Beulich wrote: Gcc12 takes issue with core_parking_remove()'s for ( ; i < cur_idle_nums; ++i ) core_parking_cpunum[i] = core_parking_cpunum[i + 1]; complaining that the right hand side array access is past the bounds of 1. Clearly the compiler

[PATCH] core-parking: fix build with gcc12 and NR_CPUS=1

2022-09-09 Thread Jan Beulich
Gcc12 takes issue with core_parking_remove()'s for ( ; i < cur_idle_nums; ++i ) core_parking_cpunum[i] = core_parking_cpunum[i + 1]; complaining that the right hand side array access is past the bounds of 1. Clearly the compiler can't know that cur_idle_nums can only ever be zero in