bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: base64: gcc-15 compile issue


From: Paul Eggert
Subject: Re: base64: gcc-15 compile issue
Date: Sat, 21 Dec 2024 17:10:14 -0800
User-agent: Mozilla Thunderbird

On 2024-12-21 11:58, Jeffrey Walton wrote:
The string literal includes the trailing NULL, so the literal is 65
chars, not 64 char.

Yes, and the C standard says this is OK; there is a special rule saying that definitions like 'char arr[3] = "abc";' are fine.

I reported the overenthusiastic GCC diagnostic to the GCC maintainers here:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117178

and it appears that they're thinking of suppressing the diagnostic if the array is declared with the nonstring attribute. We might add such an attribute if they follow through, but in the meantime I'd just ignore the false positive.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]