Re: [PATCH] issue -Wstring-compare for member arrays (PR 98097)

2021-01-08 Thread Jeff Law via Gcc-patches
On 1/7/21 5:53 PM, Martin Sebor via Gcc-patches wrote: > In PR 98097 Richard expects -Wstring-compare for a call to strcmp() > with a member array and a string literal of larger size, used in > an equality test. > > In virtually all cases the test will indicate the two are unequal > because the

[PATCH] issue -Wstring-compare for member arrays (PR 98097)

2021-01-07 Thread Martin Sebor via Gcc-patches
In PR 98097 Richard expects -Wstring-compare for a call to strcmp() with a member array and a string literal of larger size, used in an equality test. In virtually all cases the test will indicate the two are unequal because the string stored in the member must be shorter (to fit the terminating