[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <gwmtns3c6lxgsxtbit2vwjr64yqlp3wlmvj4p3o6oqi34bng5h@tenldomcival>
Date: Wed, 16 Apr 2025 02:00:26 +0530
From: Brahmajit <brahmajit.xyz@...il.com>
To: David Laight <david.laight.linux@...il.com>
Cc: Robert Moore <robert.moore@...el.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>, Len Brown <lenb@...nel.org>, linux-acpi@...r.kernel.org,
acpica-devel@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] ACPI: Fix building with GCC 15
On 15.04.2025 19:04, David Laight wrote:
>
> Doesn't than generate an 'unknown attribute' error on older compilers?
>
> Does:
> typedef char char_nonstring __attribute__((nonstring));
> char_nonstring name[4] = "abcd";
> work?
>
> If so the attribute could even be applied to 'u8'.
>
> David
David, what if I used the __nonstring attribute from
include/linux/compiler_attributes.h which defines the following
#if __has_attribute(__nonstring__)
# define __nonstring __attribute__((__nonstring__))
#else
# define __nonstring
#endif
Which I came across from
https://www.kernel.org/doc/html/latest/process/programming-language.html#attributes
Also the checkpatch.pl scripts suggests using that instead.
I guess this would work from older compilers as well.
--
Regards,
listout
Powered by blists - more mailing lists