Re: linux-next: disabling -Wstringop-truncation

2018-09-20 Thread Miguel Ojeda
Hi Stephen, Andi, (Linus),

On Fri, Aug 31, 2018 at 3:17 AM, Linus Torvalds
 wrote:
> On Thu, Aug 30, 2018 at 3:07 PM Stephen Rothwell  
> wrote:
>>
>> I am now mainly using gcc v8.2 for my builds and -Wstringop-truncation
>> causes so many warnings that I am sure to miss others, so I have
>> applied the below to my fixes tree until the noise reduces.
>
> Applied.
>
> If people want the warning with W=xyz, then this is still the correct
> patch, and we should add a line to re-enable it in
> scripts/Makefile.extrawarn.

For reference, I am sending the v5 of the Compiler Attributes series
with the __nonstring patches appended on top, and I am adding the
warning back as well, on W=1.

I think W=1 is better: there are not that many warnings compared to
those in W=2. AFAIK, it is relatively easy to achieve a clean W=1 (and
most code should at least try be W=1 clean, no?). Also, note that now
people can use __nonstring to suppress that warning (if applicable);
and that using properly __nonstring can detect even more problems
(i.e. adding __nonstring may trigger additional warnings, e.g.
-Wstringop-overflow); so I think we should encourage the use of
__nonstring.

Cheers,
Miguel


Re: linux-next: disabling -Wstringop-truncation

2018-08-30 Thread Linus Torvalds
On Thu, Aug 30, 2018 at 3:07 PM Stephen Rothwell  wrote:
>
> I am now mainly using gcc v8.2 for my builds and -Wstringop-truncation
> causes so many warnings that I am sure to miss others, so I have
> applied the below to my fixes tree until the noise reduces.

Applied.

If people want the warning with W=xyz, then this is still the correct
patch, and we should add a line to re-enable it in
scripts/Makefile.extrawarn.

 Linus


Re: linux-next: disabling -Wstringop-truncation

2018-08-30 Thread Stephen Rothwell
Hi Andi,

On Thu, 30 Aug 2018 15:32:06 -0700 Andi Kleen  wrote:
>
> Stephen Rothwell  writes:
> 
> > I am now mainly using gcc v8.2 for my builds and -Wstringop-truncation
> > causes so many warnings that I am sure to miss others, so I have
> > applied the below to my fixes tree until the noise reduces.  
> 
> I have the same problem.
> 
> However It's not clear if they're all false positives (I suspect not)

Right.

> It would be better to move the warning to W=2 or so, and also needs
> someone actually looking at them.

Sure, my patch was just a quick fix for linux-next to make it more
manageable.  Also, I am not worse off than when I was using older
compilers.

-- 
Cheers,
Stephen Rothwell


pgpX_5y4c5siH.pgp
Description: OpenPGP digital signature


Re: linux-next: disabling -Wstringop-truncation

2018-08-30 Thread Andi Kleen
Stephen Rothwell  writes:

> Hi Linus,
>
> I am now mainly using gcc v8.2 for my builds and -Wstringop-truncation
> causes so many warnings that I am sure to miss others, so I have
> applied the below to my fixes tree until the noise reduces.

I have the same problem.

However It's not clear if they're all false positives (I suspect not)

It would be better to move the warning to W=2 or so, and also needs
someone actually looking at them.

-Andi


linux-next: disabling -Wstringop-truncation

2018-08-30 Thread Stephen Rothwell
Hi Linus,

I am now mainly using gcc v8.2 for my builds and -Wstringop-truncation
causes so many warnings that I am sure to miss others, so I have
applied the below to my fixes tree until the noise reduces.

From: Stephen Rothwell 
Date: Fri, 31 Aug 2018 07:47:28 +1000
Subject: [PATCH] disable stringop truncation warnings for now

They are too noisy
Signed-off-by: Stephen Rothwell 
---
 Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Makefile b/Makefile
index 2b458801ba74..a34a9283ee90 100644
--- a/Makefile
+++ b/Makefile
@@ -807,6 +807,9 @@ KBUILD_CFLAGS += $(call 
cc-option,-Wdeclaration-after-statement,)
 # disable pointer signed / unsigned warnings in gcc 4.0
 KBUILD_CFLAGS += $(call cc-disable-warning, pointer-sign)
 
+# disable stringop warnings in gcc 8+
+KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation)
+
 # disable invalid "can't wrap" optimizations for signed / pointers
 KBUILD_CFLAGS  += $(call cc-option,-fno-strict-overflow)
 
-- 
2.19.0.rc1

-- 
Cheers,
Stephen Rothwell


pgpE6H6wykfAB.pgp
Description: OpenPGP digital signature