[Skiboot] [PATCH] fix: Fix compile errors with GCC 15

Aditya Gupta adityag at linux.ibm.com
Sat Mar 29 04:43:10 AEDT 2025


On 25/03/28 06:28PM, Dan Horák wrote:
> On Fri, 28 Mar 2025 22:43:54 +0530
> Aditya Gupta <adityag at linux.ibm.com> wrote:
> >
> > <...snip...>
> >
> > > Fix the errors by marking character arrays which are not supposed to be
> > "null-terminated strings" with "nonstring" attribute, such as
> > eye-catchers in skiboot debug descriptor and hdif header
> 
> do you know since what version GCC supports the "nostring" attribute?

Based on gcc source code, nonstring attribute has been there since
gcc 8. I have tested the attribute till GCC 8.5, it treats nonstring
as a known attribute (and ignores any unknown attributes).

https://github.com/gcc-mirror/gcc/blob/58b59251ea22913ce0d5871db64f5d24f2b15493/include/ansidecl.h#L245

But the error 'null-terminated-strings' seems to be recently introduced
in gcc 15 only, introduced with this patch:
https://gcc.gnu.org/pipermail/gcc-patches/2024-June/656014.html

Thanks,
- Aditya G


More information about the Skiboot mailing list