Re: [PING] [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-08-29 Thread Jeff Law
On 08/17/2018 03:14 AM, Bernd Edlinger wrote: > Hi! > > > After the other patch has been applied, I re-based this patch accordingly. > > Except the mechanical changes, there are a few notable differences to the > previous version: > > In string_constant, I added a similar check for the STRING_C

Re: [PING] [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-08-18 Thread Bernd Edlinger
On 08/18/18 06:01, Jeff Law wrote: > On 08/17/2018 03:14 AM, Bernd Edlinger wrote: >> Hi! >> >> >> After the other patch has been applied, I re-based this patch accordingly. >> >> Except the mechanical changes, there are a few notable differences to the >> previous version: >> >> In string_constant

Re: [PING] [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-08-17 Thread Jeff Law
On 08/17/2018 03:14 AM, Bernd Edlinger wrote: > Hi! > > > After the other patch has been applied, I re-based this patch accordingly. > > Except the mechanical changes, there are a few notable differences to the > previous version: > > In string_constant, I added a similar check for the STRING_C

Re: [PING] [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-08-17 Thread Bernd Edlinger
Hi! After the other patch has been applied, I re-based this patch accordingly. Except the mechanical changes, there are a few notable differences to the previous version: In string_constant, I added a similar check for the STRING_CSTs because when callers don't use mem_size, they assume to be a

Re: [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-08-14 Thread Jeff Law
On 08/03/2018 03:38 PM, Bernd Edlinger wrote: > On 08/03/18 23:15, Jeff Law wrote: >> On 07/30/2018 02:21 PM, Bernd Edlinger wrote: >>> On 07/30/18 21:52, Martin Sebor wrote: On 07/30/2018 09:24 AM, Bernd Edlinger wrote: > On 07/30/18 01:05, Martin Sebor wrote: >> On 07/29/2018 04:56 A

Re: [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-08-14 Thread Jeff Law
On 08/03/2018 03:28 PM, Jakub Jelinek wrote: > On Fri, Aug 03, 2018 at 03:16:41PM -0600, Jeff Law wrote: >> On 07/31/2018 12:33 AM, Jakub Jelinek wrote: >>> On Mon, Jul 30, 2018 at 10:01:38PM -0600, Martin Sebor wrote: > We do not want to change what is currently accepted by the > front end

Re: [PING] [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-08-14 Thread Bernd Edlinger
On 08/13/18 16:27, Martin Sebor wrote: > As I said below, the patch for PR 86552, 86711, 86714 that > was first posted on July 19 fixes both of these issues and > also diagnoses calls with unterminated strings: > >   https://gcc.gnu.org/ml/gcc-patches/2018-08/msg00155.html > Sorry, but you you

Re: [PING] [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-08-13 Thread Martin Sebor
As I said below, the patch for PR 86552, 86711, 86714 that was first posted on July 19 fixes both of these issues and also diagnoses calls with unterminated strings: https://gcc.gnu.org/ml/gcc-patches/2018-08/msg00155.html On 08/12/2018 03:06 AM, Bernd Edlinger wrote: Hi, I'd like to ping fo

[PING] [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-08-12 Thread Bernd Edlinger
Hi, I'd like to ping for this patch: https://gcc.gnu.org/ml/gcc-patches/2018-07/msg01800.html I will add a new BZ entry for the (minor) regression this patch introduces in gcc.dg/strlenopt-49.c and assign it to myself. Thanks Bernd. On 07/29/18 12:56, Bernd Edlinger wrote: > Hi! > > This fix

Re: [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-08-03 Thread Bernd Edlinger
On 08/03/18 23:15, Jeff Law wrote: > On 07/30/2018 02:21 PM, Bernd Edlinger wrote: >> On 07/30/18 21:52, Martin Sebor wrote: >>> On 07/30/2018 09:24 AM, Bernd Edlinger wrote: On 07/30/18 01:05, Martin Sebor wrote: > On 07/29/2018 04:56 AM, Bernd Edlinger wrote: >> Hi! >> >> Thi

Re: [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-08-03 Thread Jakub Jelinek
On Fri, Aug 03, 2018 at 03:16:41PM -0600, Jeff Law wrote: > On 07/31/2018 12:33 AM, Jakub Jelinek wrote: > > On Mon, Jul 30, 2018 at 10:01:38PM -0600, Martin Sebor wrote: > >>> We do not want to change what is currently accepted by the > >>> front end. period. > >> > >> On whose behalf are you maki

Re: [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-08-03 Thread Jeff Law
On 07/30/2018 01:52 PM, Martin Sebor wrote: > On 07/30/2018 09:24 AM, Bernd Edlinger wrote: >> On 07/30/18 01:05, Martin Sebor wrote: >>> On 07/29/2018 04:56 AM, Bernd Edlinger wrote: Hi! This fixes two wrong code bugs where string_constant returns over length string constants. 

Re: [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-08-03 Thread Jeff Law
On 07/31/2018 12:33 AM, Jakub Jelinek wrote: > On Mon, Jul 30, 2018 at 10:01:38PM -0600, Martin Sebor wrote: >>> We do not want to change what is currently accepted by the >>> front end. period. >> >> On whose behalf are you making such categorical statements? >> It was Jakub and Richard's suggesti

Re: [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-08-03 Thread Jeff Law
On 07/30/2018 02:21 PM, Bernd Edlinger wrote: > On 07/30/18 21:52, Martin Sebor wrote: >> On 07/30/2018 09:24 AM, Bernd Edlinger wrote: >>> On 07/30/18 01:05, Martin Sebor wrote: On 07/29/2018 04:56 AM, Bernd Edlinger wrote: > Hi! > > This fixes two wrong code bugs where string_con

Re: [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-07-30 Thread Jakub Jelinek
On Mon, Jul 30, 2018 at 10:01:38PM -0600, Martin Sebor wrote: > > We do not want to change what is currently accepted by the > > front end. period. > > On whose behalf are you making such categorical statements? > It was Jakub and Richard's suggestion in bug 86714 to reject > the undefined excessi

Re: [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-07-30 Thread Martin Sebor
On 07/30/2018 02:21 PM, Bernd Edlinger wrote: On 07/30/18 21:52, Martin Sebor wrote: On 07/30/2018 09:24 AM, Bernd Edlinger wrote: On 07/30/18 01:05, Martin Sebor wrote: On 07/29/2018 04:56 AM, Bernd Edlinger wrote: Hi! This fixes two wrong code bugs where string_constant returns over length

Re: [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-07-30 Thread Bernd Edlinger
On 07/30/18 21:52, Martin Sebor wrote: > On 07/30/2018 09:24 AM, Bernd Edlinger wrote: >> On 07/30/18 01:05, Martin Sebor wrote: >>> On 07/29/2018 04:56 AM, Bernd Edlinger wrote: Hi! This fixes two wrong code bugs where string_constant returns over length string constants.  Init

Re: [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-07-30 Thread Martin Sebor
On 07/30/2018 09:24 AM, Bernd Edlinger wrote: On 07/30/18 01:05, Martin Sebor wrote: On 07/29/2018 04:56 AM, Bernd Edlinger wrote: Hi! This fixes two wrong code bugs where string_constant returns over length string constants. Initializers like that are rejected in C++, but valid in C. If by

Re: [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-07-30 Thread Bernd Edlinger
On 07/30/18 01:05, Martin Sebor wrote: > On 07/29/2018 04:56 AM, Bernd Edlinger wrote: >> Hi! >> >> This fixes two wrong code bugs where string_constant >> returns over length string constants.  Initializers >> like that are rejected in C++, but valid in C. > > If by valid you are referring to dec

Re: [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-07-30 Thread Martin Sebor
On 07/30/2018 12:57 AM, Richard Biener wrote: On Sun, 29 Jul 2018, Martin Sebor wrote: On 07/29/2018 04:56 AM, Bernd Edlinger wrote: Hi! This fixes two wrong code bugs where string_constant returns over length string constants. Initializers like that are rejected in C++, but valid in C. If

Re: [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-07-29 Thread Richard Biener
On Sun, 29 Jul 2018, Martin Sebor wrote: > On 07/29/2018 04:56 AM, Bernd Edlinger wrote: > > Hi! > > > > This fixes two wrong code bugs where string_constant > > returns over length string constants. Initializers > > like that are rejected in C++, but valid in C. > > If by valid you are referri

Re: [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-07-29 Thread Martin Sebor
On 07/29/2018 04:56 AM, Bernd Edlinger wrote: Hi! This fixes two wrong code bugs where string_constant returns over length string constants. Initializers like that are rejected in C++, but valid in C. If by valid you are referring to declarations like the one in the added test: const cha

[PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-07-29 Thread Bernd Edlinger
Hi! This fixes two wrong code bugs where string_constant returns over length string constants. Initializers like that are rejected in C++, but valid in C. I have xfailed strlenopt-49.c, which tests this feature. Personally I don't think that it is worth the effort to optimize something that is p