Re: [PATCH] Handle overlength strings in the C FE

2018-08-09 Thread Joseph Myers
On Thu, 9 Aug 2018, Bernd Edlinger wrote: > On 08/01/18 22:43, Joseph Myers wrote: > > On Wed, 1 Aug 2018, Marek Polacek wrote: > > > >> I guess you want XALLOCAVAR or XNEWVAR. > > > > Not XALLOCAVAR; GCC supports string constants up to 2 GB (minus one byte), > > which is far too much to put on

Re: [PATCH] Handle overlength strings in the C FE

2018-08-09 Thread Bernd Edlinger
On 08/01/18 22:43, Joseph Myers wrote: > On Wed, 1 Aug 2018, Marek Polacek wrote: > >> I guess you want XALLOCAVAR or XNEWVAR. > > Not XALLOCAVAR; GCC supports string constants up to 2 GB (minus one byte), > which is far too much to put on the stack. > I assume you want me to use XNEWVEC/XDELET

Re: [PATCH] Handle overlength strings in the C FE

2018-08-01 Thread Joseph Myers
On Wed, 1 Aug 2018, Eric Gallager wrote: > While modifying -Woverlength-strings, I think a good way to test it The -Woverlength-strings option (warn about string constants longer than the minimum guaranteed by the C standard to be supported) has nothing whatever to do with the present patch dis

Re: [PATCH] Handle overlength strings in the C FE

2018-08-01 Thread Eric Gallager
On 8/1/18, Martin Sebor wrote: > On 08/01/2018 05:20 AM, Bernd Edlinger wrote: >> On 07/30/18 17:49, Joseph Myers wrote: >>> On Mon, 30 Jul 2018, Bernd Edlinger wrote: >>> Hi, this is how I would like to handle the over length strings issue in the C FE. If the string const

Re: [PATCH] Handle overlength strings in the C FE

2018-08-01 Thread Joseph Myers
On Wed, 1 Aug 2018, Marek Polacek wrote: > I guess you want XALLOCAVAR or XNEWVAR. Not XALLOCAVAR; GCC supports string constants up to 2 GB (minus one byte), which is far too much to put on the stack. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH] Handle overlength strings in the C FE

2018-08-01 Thread Marek Polacek
On Wed, Aug 01, 2018 at 08:06:53PM +, Bernd Edlinger wrote: > On 08/01/18 18:04, Joseph Myers wrote: > > On Wed, 1 Aug 2018, Bernd Edlinger wrote: > > > >> On 07/30/18 17:49, Joseph Myers wrote: > >>> On Mon, 30 Jul 2018, Bernd Edlinger wrote: > >>> > Hi, > > this is how I would

Re: [PATCH] Handle overlength strings in the C FE

2018-08-01 Thread Bernd Edlinger
On 08/01/18 18:04, Joseph Myers wrote: > On Wed, 1 Aug 2018, Bernd Edlinger wrote: > >> On 07/30/18 17:49, Joseph Myers wrote: >>> On Mon, 30 Jul 2018, Bernd Edlinger wrote: >>> Hi, this is how I would like to handle the over length strings issue in the C FE. If the strin

Re: [PATCH] Handle overlength strings in the C FE

2018-08-01 Thread Bernd Edlinger
On 08/01/18 19:07, Martin Sebor wrote: > On 08/01/2018 05:20 AM, Bernd Edlinger wrote: >> On 07/30/18 17:49, Joseph Myers wrote: >>> On Mon, 30 Jul 2018, Bernd Edlinger wrote: >>> Hi, this is how I would like to handle the over length strings issue in the C FE. If the stri

Re: [PATCH] Handle overlength strings in the C FE

2018-08-01 Thread Martin Sebor
On 08/01/2018 05:20 AM, Bernd Edlinger wrote: On 07/30/18 17:49, Joseph Myers wrote: On Mon, 30 Jul 2018, Bernd Edlinger wrote: Hi, this is how I would like to handle the over length strings issue in the C FE. If the string constant is exactly the right length and ends in one explicit NUL cha

Re: [PATCH] Handle overlength strings in the C FE

2018-08-01 Thread Joseph Myers
On Wed, 1 Aug 2018, Bernd Edlinger wrote: > On 07/30/18 17:49, Joseph Myers wrote: > > On Mon, 30 Jul 2018, Bernd Edlinger wrote: > > > >> Hi, > >> > >> this is how I would like to handle the over length strings issue in the C > >> FE. > >> If the string constant is exactly the right length and

[PATCH] Handle overlength strings in the C FE

2018-08-01 Thread Bernd Edlinger
On 07/30/18 17:49, Joseph Myers wrote: > On Mon, 30 Jul 2018, Bernd Edlinger wrote: > >> Hi, >> >> this is how I would like to handle the over length strings issue in the C FE. >> If the string constant is exactly the right length and ends in one explicit >> NUL character, shorten it by one charac