public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] gcc-15: acpi: sprinkle random '__nonstring' crumbles around
@ 2025-04-21  0:35 Guenter Roeck
  2025-04-21  1:52 ` Kees Cook
  0 siblings, 1 reply; 6+ messages in thread
From: Guenter Roeck @ 2025-04-21  0:35 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, linux-acpi

On Sun, Apr 20, 2025 at 11:02:18AM -0700, Linus Torvalds wrote:
> This is not great: I'd much rather introduce a typedef that is a "ACPI
> name byte buffer", and use that to mark these special 4-byte ACPI names
> that do not use NUL termination.
> 
> But as noted in the previous commit ("gcc-15: make 'unterminated string
> initialization' just a warning") gcc doesn't actually seem to support
> that notion, so instead you have to just mark every single array
> declaration individually.
> 
> So this is not pretty, but this gets rid of the bulk of the annoying
> warnings during an allmodconfig build for me.
> 

With gcc 13.3:

Building i386:defconfig ... failed
--------------
Error log:
drivers/acpi/tables.c:399:1: error: 'nonstring' attribute ignored on objects of type 'const char[][4]' [-Werror=attributes]
  399 | static const char table_sigs[][ACPI_NAMESEG_SIZE] __initconst __nonstring = {

Guenter

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-04-27 11:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-21  0:35 [PATCH] gcc-15: acpi: sprinkle random '__nonstring' crumbles around Guenter Roeck
2025-04-21  1:52 ` Kees Cook
2025-04-21  4:33   ` Linus Torvalds
2025-04-21 16:39     ` Kees Cook
2025-04-21 16:50       ` Linus Torvalds
2025-04-27 11:24     ` David Laight

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox