Re: [PATCH] consider parameter names in -Wvla-parameter (PR 97548)

2021-07-15 Thread Martin Sebor via Gcc-patches
On 7/8/21 5:36 PM, Jeff Law wrote: On 7/1/2021 7:02 PM, Martin Sebor via Gcc-patches wrote: -Wvla-parameter relies on operand_equal_p() with OEP_LEXICOGRAPHIC set to compare VLA bounds for equality.  But operand_equal_p() doesn't consider decl names, and so nontrivial expressions that refer to

Re: [PATCH] consider parameter names in -Wvla-parameter (PR 97548)

2021-07-08 Thread Jeff Law via Gcc-patches
On 7/1/2021 7:02 PM, Martin Sebor via Gcc-patches wrote: -Wvla-parameter relies on operand_equal_p() with OEP_LEXICOGRAPHIC set to compare VLA bounds for equality.  But operand_equal_p() doesn't consider decl names, and so nontrivial expressions that refer to the same function parameter are co

[PATCH] consider parameter names in -Wvla-parameter (PR 97548)

2021-07-01 Thread Martin Sebor via Gcc-patches
-Wvla-parameter relies on operand_equal_p() with OEP_LEXICOGRAPHIC set to compare VLA bounds for equality. But operand_equal_p() doesn't consider decl names, and so nontrivial expressions that refer to the same function parameter are considered unequal by the function, leading to false positives.