Re: [PATCH] use string length to relax -Wstringop-overflow for nonstrings (PR 85623)

2018-05-22 Thread Martin Sebor
On 05/21/2018 05:02 PM, Jeff Law wrote: On 05/10/2018 01:26 PM, Martin Sebor wrote: GCC 8.1 warns for unbounded (and some bounded) string comparisons involving arrays declared attribute nonstring (i.e., char arrays that need not be nul-terminated). For instance: extern

Re: [PATCH] use string length to relax -Wstringop-overflow for nonstrings (PR 85623)

2018-05-21 Thread Jeff Law
On 05/10/2018 01:26 PM, Martin Sebor wrote: > GCC 8.1 warns for unbounded (and some bounded) string comparisons > involving arrays declared attribute nonstring (i.e., char arrays > that need not be nul-terminated).  For instance: > >   extern __attribute__((nonstring)) char a[4]; > >   int f 

Re: [PATCH] use string length to relax -Wstringop-overflow for nonstrings (PR 85623)

2018-05-17 Thread Martin Sebor
Ping: https://gcc.gnu.org/ml/gcc-patches/2018-05/msg00509.html On 05/10/2018 01:26 PM, Martin Sebor wrote: GCC 8.1 warns for unbounded (and some bounded) string comparisons involving arrays declared attribute nonstring (i.e., char arrays that need not be nul-terminated). For instance:

Re: [PATCH] use string length to relax -Wstringop-overflow for nonstrings (PR 85623)

2018-05-14 Thread Martin Sebor
On 05/14/2018 10:43 AM, Franz Sirl wrote: Am 2018-05-10 um 21:26 schrieb Martin Sebor: GCC 8.1 warns for unbounded (and some bounded) string comparisons involving arrays declared attribute nonstring (i.e., char arrays that need not be nul-terminated). For instance: extern

Re: [PATCH] use string length to relax -Wstringop-overflow for nonstrings (PR 85623)

2018-05-14 Thread Franz Sirl
Am 2018-05-10 um 21:26 schrieb Martin Sebor: GCC 8.1 warns for unbounded (and some bounded) string comparisons involving arrays declared attribute nonstring (i.e., char arrays that need not be nul-terminated).  For instance:   extern __attribute__((nonstring)) char a[4];   int f (void)   {

[PATCH] use string length to relax -Wstringop-overflow for nonstrings (PR 85623)

2018-05-10 Thread Martin Sebor
GCC 8.1 warns for unbounded (and some bounded) string comparisons involving arrays declared attribute nonstring (i.e., char arrays that need not be nul-terminated). For instance: extern __attribute__((nonstring)) char a[4]; int f (void) { return strncmp (a, "123", sizeof a); }