Re: [HACKERS] new gcc 7.0.1 warnings

2017-03-08 Thread Pavel Stehule
2017-03-08 17:33 GMT+01:00 Alvaro Herrera : > Pavel Stehule wrote: > > 2017-02-18 18:35 GMT+01:00 Tom Lane : > > > > > Pavel Stehule writes: > > > > Do the warnings go away if you add some explicit guard to the precision > > > variable, say like this: > > > > > > { > > >

Re: [HACKERS] new gcc 7.0.1 warnings

2017-03-08 Thread Alvaro Herrera
Pavel Stehule wrote: > 2017-02-18 18:35 GMT+01:00 Tom Lane : > > > Pavel Stehule writes: > > Do the warnings go away if you add some explicit guard to the precision > > variable, say like this: > > > > { > > intndig = DBL_DIG + extra_float_digits; > > > >

Re: [HACKERS] new gcc 7.0.1 warnings

2017-03-08 Thread Pavel Stehule
2017-03-08 16:59 GMT+01:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > On 2/18/17 02:08, Pavel Stehule wrote: > > I am checking new Fedora 26, where new gcc compiler is used. > > > > float.c: In function ‘float4out’: > > float.c:382:41: warning: ‘%.*g’ directive output may be truncated

Re: [HACKERS] new gcc 7.0.1 warnings

2017-03-08 Thread Peter Eisentraut
On 2/18/17 02:08, Pavel Stehule wrote: > I am checking new Fedora 26, where new gcc compiler is used. > > float.c: In function ‘float4out’: > float.c:382:41: warning: ‘%.*g’ directive output may be truncated > writing between 1 and 310 bytes into a region of size 65 > [-Wformat-truncation=] >

Re: [HACKERS] new gcc 7.0.1 warnings

2017-02-18 Thread Pavel Stehule
2017-02-18 18:35 GMT+01:00 Tom Lane : > Pavel Stehule writes: > > float.c:382:5: note: ‘snprintf’ output between 2 and 311 bytes into a > > destination of size 65 > > float.c:618:5: note: ‘snprintf’ output between 2 and 311 bytes into a > > destination of size 129 > > That's kind of annoying. I

Re: [HACKERS] new gcc 7.0.1 warnings

2017-02-18 Thread Tom Lane
Pavel Stehule writes: > float.c:382:5: note: ‘snprintf’ output between 2 and 311 bytes into a > destination of size 65 > float.c:618:5: note: ‘snprintf’ output between 2 and 311 bytes into a > destination of size 129 That's kind of annoying. I suppose the point is that the compiler can't see wha

[HACKERS] new gcc 7.0.1 warnings

2017-02-17 Thread Pavel Stehule
Hi I am checking new Fedora 26, where new gcc compiler is used. float.c: In function ‘float4out’: float.c:382:41: warning: ‘%.*g’ directive output may be truncated writing between 1 and 310 bytes into a region of size 65 [-Wformat-truncation=] snprintf(ascii, MAXFLOATWIDTH + 1, "%.*g", ndig,