Re: Calculating array sizes in C - was: Re: Build regressions/improvements in v6.2-rc1

2023-01-22 Thread John Paul Adrian Glaubitz
Hi! On 1/20/23 20:29, Michael Karcher wrote: Hello Adrian, Could you post a kernel patch for that? I would be happy to test it on my SH-7785CLR board. Also, I'm going to file a bug report against GCC. I filed the bug already. It's https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108483. The dif

Re: Calculating array sizes in C - was: Re: Build regressions/improvements in v6.2-rc1

2023-01-20 Thread Michael Karcher
Hello Adrian, Could you post a kernel patch for that? I would be happy to test it on my SH-7785CLR board. Also, I'm going to file a bug report against GCC. I filed the bug already. It's https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108483. The diff is attached. It's published as CC0 in case a

Re: Calculating array sizes in C - was: Re: Build regressions/improvements in v6.2-rc1

2023-01-20 Thread Michael.Karcher
Hello! Can someone please file a GCC PR? With reduced testcase preferably. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108483 There you are. Kind regars,   Michael Karcher

RE: Calculating array sizes in C - was: Re: Build regressions/improvements in v6.2-rc1

2023-01-20 Thread David Laight
From: Segher Boessenkool > Sent: 20 January 2023 10:54 ... > > > I suggest to file a bug against gcc complaining about a "spurious > > > warning", and using "-Werror -Wno-error-sizeof-pointer-div" until gcc is > > > adapted to not emit the warning about the pointer division if the result > > > is n

Re: Calculating array sizes in C - was: Re: Build regressions/improvements in v6.2-rc1

2023-01-20 Thread John Paul Adrian Glaubitz
Hi Michael! On 1/19/23 23:11, Michael.Karcher wrote: I suggest to file a bug against gcc complaining about a "spurious warning", and using "-Werror -Wno-error-sizeof-pointer-div" until gcc is adapted to not emit the warning about the pointer division if the result is not used. Could you post a

Re: Calculating array sizes in C - was: Re: Build regressions/improvements in v6.2-rc1

2023-01-20 Thread Segher Boessenkool
On Thu, Jan 19, 2023 at 09:31:21PM -0600, Rob Landley wrote: > On 1/19/23 16:11, Michael.Karcher wrote: > > I don't see a clear bug at this point. We are talking about the C expression > > > >   __same_type((void*)0, (void*)0)? 0 : sizeof((void*)0)/sizeof(*((void*0)) (__same_type is a kernel mac

Re: Calculating array sizes in C - was: Re: Build regressions/improvements in v6.2-rc1

2023-01-20 Thread Rob Landley
On 1/19/23 16:11, Michael.Karcher wrote: > Isn't this supposed to be caught by this check: a, __same_type(a, NULL) ? >>> >>> Yeah, but gcc thinks it is smarter than us... >>> Probably it drops the test, assuming UB cannot happen. >> Hmm, sounds like a GGC bug to me t

Re: Calculating array sizes in C - was: Re: Build regressions/improvements in v6.2-rc1

2023-01-20 Thread Michael.Karcher
Isn't this supposed to be caught by this check: a, __same_type(a, NULL) ? Yeah, but gcc thinks it is smarter than us... Probably it drops the test, assuming UB cannot happen. Hmm, sounds like a GGC bug to me then. Not sure how to fix this then. I don't see a clear bug at this poi

Re: Calculating array sizes in C - was: Re: Build regressions/improvements in v6.2-rc1

2023-01-17 Thread John Paul Adrian Glaubitz
Hi! On 1/17/23 21:05, Geert Uytterhoeven wrote: Isn't this supposed to be caught by this check: a, __same_type(a, NULL) ? Yeah, but gcc thinks it is smarter than us... Probably it drops the test, assuming UB cannot happen. Hmm, sounds like a GGC bug to me then. Not sure how to fix

Re: Calculating array sizes in C - was: Re: Build regressions/improvements in v6.2-rc1

2023-01-17 Thread Geert Uytterhoeven
Hi Adrian, On Tue, Jan 17, 2023 at 6:06 PM John Paul Adrian Glaubitz wrote: > On 1/17/23 18:01, Geert Uytterhoeven wrote: > > The issue is that some of the parameters are not arrays, but > > NULL. E.g.: > > > > arch/sh/kernel/cpu/sh2/setup-sh7619.c:static > > DECLARE_INTC_DESC(intc_desc, "sh7619"

Calculating array sizes in C - was: Re: Build regressions/improvements in v6.2-rc1

2023-01-17 Thread John Paul Adrian Glaubitz
Hi Geert! On 1/6/23 16:17, Geert Uytterhoeven wrote: I'm not seeing this one, but I am getting this one instead: In file included from ./arch/sh/include/asm/hw_irq.h:6, from ./include/linux/irq.h:596, from ./include/asm-generic/hardirq.h:17,

Re: Calculating array sizes in C - was: Re: Build regressions/improvements in v6.2-rc1

2023-01-17 Thread Geert Uytterhoeven
Hi Adrian, On Tue, Jan 17, 2023 at 5:42 PM John Paul Adrian Glaubitz wrote: > On 1/6/23 16:17, Geert Uytterhoeven wrote: > >> I'm not seeing this one, but I am getting this one instead: > >> > >> In file included from ./arch/sh/include/asm/hw_irq.h:6, > >>from ./include/linux/

Re: Calculating array sizes in C - was: Re: Build regressions/improvements in v6.2-rc1

2023-01-17 Thread John Paul Adrian Glaubitz
Hi! On 1/17/23 18:01, Geert Uytterhoeven wrote: The issue is that some of the parameters are not arrays, but NULL. E.g.: arch/sh/kernel/cpu/sh2/setup-sh7619.c:static DECLARE_INTC_DESC(intc_desc, "sh7619", vectors, NULL, arch/sh/kernel/cpu/sh2/setup-sh7619.c- NULL, prio_registe

Re: Build regressions/improvements in v6.2-rc1

2023-01-06 Thread Alex Deucher
On Tue, Dec 27, 2022 at 10:34 AM Geert Uytterhoeven wrote: > > On Tue, 27 Dec 2022, Geert Uytterhoeven wrote: > > Below is the list of build error/warning regressions/improvements in > > v6.2-rc1[1] compared to v6.1[2]. > > > > Summarized: > > - build errors: +11/-13 > > amd-gfx@lists.freedesktop

Re: Build regressions/improvements in v6.2-rc1

2023-01-06 Thread Geert Uytterhoeven
Hi John, On Fri, Jan 6, 2023 at 4:10 PM John Paul Adrian Glaubitz wrote: > On 12/27/22 09:35, Geert Uytterhoeven wrote: > >+ /kisskb/src/include/linux/compiler_types.h: error: call to > > '__compiletime_assert_262' declared with attribute error: Unsupported > > access size for {READ,WRITE}_

Re: Build regressions/improvements in v6.2-rc1

2023-01-06 Thread Geert Uytterhoeven
On Fri, Jan 6, 2023 at 4:17 PM Geert Uytterhoeven wrote: > > Hi John, Bummer, "Hi Adrian", ofc ;-) Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself

Re: Build regressions/improvements in v6.2-rc1

2023-01-06 Thread John Paul Adrian Glaubitz
Hi Geert! On 12/27/22 09:35, Geert Uytterhoeven wrote: + /kisskb/src/include/linux/compiler_types.h: error: call to '__compiletime_assert_262' declared with attribute error: Unsupported access size for {READ,WRITE}_ONCE().: => 358:45 + /kisskb/src/include/linux/compiler_types.h: error:

Re: Build regressions/improvements in v6.2-rc1

2022-12-27 Thread Geert Uytterhoeven
On Tue, 27 Dec 2022, Geert Uytterhoeven wrote: Below is the list of build error/warning regressions/improvements in v6.2-rc1[1] compared to v6.1[2]. Summarized: - build errors: +11/-13 amd-gfx@lists.freedesktop.org linux-arm-ker...@lists.infradead.org linux-me...@vger.kernel.org linux-wirel..