RE: [PATCH] Mode-Switching: Fix local array maybe uninitialized warning

2023-05-20 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Jeff Law Sent: Saturday, May 20, 2023 12:24 PM To: Li, Pan2 ; gcc-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai; kito.ch...@sifive.com; Wang, Yanzhang Subject: Re: [PATCH] Mode-Switching: Fix local array maybe uninitialized warning

Re: [PATCH] Mode-Switching: Fix local array maybe uninitialized warning

2023-05-19 Thread Jeff Law via Gcc-patches
On 5/19/23 17:56, pan2...@intel.com wrote: From: Pan Li There are 2 local array in function optimize_mode_switching. It will be initialized conditionally at the beginning but then always consumed in another loop. It may trigger the warning maybe-uninitialized, and may result in build

[PATCH] Mode-Switching: Fix local array maybe uninitialized warning

2023-05-19 Thread Pan Li via Gcc-patches
From: Pan Li There are 2 local array in function optimize_mode_switching. It will be initialized conditionally at the beginning but then always consumed in another loop. It may trigger the warning maybe-uninitialized, and may result in build failure when enable werror, aka warning as error.