Re: [PATCH] handle local aggregate initialization in strlen (PR 83821)

2018-05-25 Thread Martin Sebor
On 05/25/2018 03:55 PM, Marc Glisse wrote: On Fri, 25 May 2018, Martin Sebor wrote: Why couldn't nonzero_chars be constant in that case? void f(const char*s){ s[0]='a'; // I know that strlen(s) is at least 1 here } I was responding specifically to your question about the strlen() CSE.

Re: [PATCH] handle local aggregate initialization in strlen (PR 83821)

2018-05-25 Thread Marc Glisse
On Fri, 25 May 2018, Martin Sebor wrote: Why couldn't nonzero_chars be constant in that case? void f(const char*s){ s[0]='a'; // I know that strlen(s) is at least 1 here } I was responding specifically to your question about the strlen() CSE. Above there is no call to strlen(). What I

Re: [PATCH] handle local aggregate initialization in strlen (PR 83821)

2018-05-25 Thread Martin Sebor
On 05/25/2018 12:06 AM, Marc Glisse wrote: On Thu, 24 May 2018, Martin Sebor wrote: On 05/24/2018 03:40 PM, Marc Glisse wrote: On Wed, 23 May 2018, Martin Sebor wrote: On 05/23/2018 08:57 AM, Jeff Law wrote: On 05/10/2018 04:05 PM, Marc Glisse wrote: On Thu, 10 May 2018, Martin Sebor

Re: [PATCH] handle local aggregate initialization in strlen (PR 83821)

2018-05-25 Thread Marc Glisse
On Thu, 24 May 2018, Martin Sebor wrote: On 05/24/2018 03:40 PM, Marc Glisse wrote: On Wed, 23 May 2018, Martin Sebor wrote: On 05/23/2018 08:57 AM, Jeff Law wrote: On 05/10/2018 04:05 PM, Marc Glisse wrote: On Thu, 10 May 2018, Martin Sebor wrote: Can you please comment/respond to

Re: [PATCH] handle local aggregate initialization in strlen (PR 83821)

2018-05-24 Thread Martin Sebor
On 05/24/2018 03:40 PM, Marc Glisse wrote: On Wed, 23 May 2018, Martin Sebor wrote: On 05/23/2018 08:57 AM, Jeff Law wrote: On 05/10/2018 04:05 PM, Marc Glisse wrote: On Thu, 10 May 2018, Martin Sebor wrote: Can you please comment/respond to Jeff's question below and confirm whether my

Re: [PATCH] handle local aggregate initialization in strlen (PR 83821)

2018-05-24 Thread Marc Glisse
On Wed, 23 May 2018, Martin Sebor wrote: On 05/23/2018 08:57 AM, Jeff Law wrote: On 05/10/2018 04:05 PM, Marc Glisse wrote: On Thu, 10 May 2018, Martin Sebor wrote: Can you please comment/respond to Jeff's question below and confirm whether my understanding of the restriction (below) is

Re: [PATCH] handle local aggregate initialization in strlen (PR 83821)

2018-05-24 Thread Jeff Law
On 05/23/2018 01:28 PM, Martin Sebor wrote: > On 05/23/2018 08:57 AM, Jeff Law wrote: >> On 05/10/2018 04:05 PM, Marc Glisse wrote: >>> On Thu, 10 May 2018, Martin Sebor wrote: >>> Can you please comment/respond to Jeff's question below and confirm whether my understanding of the

Re: [PATCH] handle local aggregate initialization in strlen (PR 83821)

2018-05-23 Thread Martin Sebor
On 05/23/2018 08:57 AM, Jeff Law wrote: On 05/10/2018 04:05 PM, Marc Glisse wrote: On Thu, 10 May 2018, Martin Sebor wrote: Can you please comment/respond to Jeff's question below and confirm whether my understanding of the restriction (below) is correct? I don't remember it at all, I

Re: [PATCH] handle local aggregate initialization in strlen (PR 83821)

2018-05-23 Thread Jeff Law
On 05/10/2018 04:05 PM, Marc Glisse wrote: > On Thu, 10 May 2018, Martin Sebor wrote: > >> Can you please comment/respond to Jeff's question below and >> confirm whether my understanding of the restriction (below) >> is correct? > > I don't remember it at all, I really should have expanded that

Re: [PATCH] handle local aggregate initialization in strlen (PR 83821)

2018-05-10 Thread Marc Glisse
On Thu, 10 May 2018, Martin Sebor wrote: Can you please comment/respond to Jeff's question below and confirm whether my understanding of the restriction (below) is correct? I don't remember it at all, I really should have expanded that comment... The documentation of nonzero_chars seems to

Re: [PATCH] handle local aggregate initialization in strlen (PR 83821)

2018-05-10 Thread Martin Sebor
Hi Marc, Can you please comment/respond to Jeff's question below and confirm whether my understanding of the restriction (below) is correct? Thanks Martin On 04/30/2018 11:50 AM, Jeff Law wrote: On 01/12/2018 02:30 PM, Martin Sebor wrote: A failure in a test for the recently enhanced

Re: [PATCH] handle local aggregate initialization in strlen (PR 83821)

2018-04-30 Thread Jeff Law
On 01/12/2018 02:30 PM, Martin Sebor wrote: > A failure in a test for the recently enhanced -Warray-bounds > warning exposed an unnecessarily broad restriction in the strlen > pass that prevents it from tracking the length of a member string > of locally defined and initialized struct: > >   void 

Re: [PATCH] handle local aggregate initialization in strlen (PR 83821)

2018-01-18 Thread Martin Sebor
Ping: https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01131.html This was submitted in stage 3 but if fixing xfailed assertions in tests by enhancing optimizations is out of scope for the current stage let me know so I can schedule this change for GCC 9. On 01/12/2018 02:30 PM, Martin Sebor