Subject: Re: bug#77835: [PATCH] Pacify GCC 15 -Wunterminated-string-initialization warnings

From: Eli Zaretskii <[email-masked]>
Date: Sun, 20 Apr 2025 11:10:04 +0300

> Date: Sat, 19 Apr 2025 22:41:33 -0700
> Cc: [email-masked]
> From: Paul Eggert <[email-masked]>
> 
> On 2025-04-16 02:40, Eli Zaretskii wrote:
> > -      static char const hexdigit[16] = "0123456789abcdef";
> > +      static char const hexdigit[17] = "0123456789abcdef";
> 
> Although that would pacify GCC, it would make the code more confusing 
> because it doesn't clearly indicate to the human reader that hexdigit is 
> unusual because it is used only as a 16-element array, not as a 
> null-terminated string.
> 
> I ran into this problem independently and installed the obvious patch 
> (attached). I didn't recall your email suggesting this other solution 
> until just now. If you prefer the more-confusing solution please feel to 
> install it, but at least please add comments explaining what's going on. 

How portable is the attribute you used to fix this?  AFAICT, it is
supported since GCC 4.8, but our INSTALL indicates that we support
older versions of GCC.  Or does Gnulib solve this?