|
From: | RANDRIANAINA Georges Aaron |
Subject: | Re: [bug #60798] Make does not compile with GCC 11.1.0 |
Date: | Mon, 21 Jun 2021 16:28:21 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
It gives the same error:
src/main.c:1954:16: error: writes 1 byte in a region of size 0
[-Werror=stringop-overflow=]
1954 | *(p - 1) = '\0';
| ~~~~~~~~~^~~~~~
p[-1] = '\0';
Is this just a style warning being turned into an error?That is, would this compile if the line was rewritten as:
*(p - 1) = ‘\0’;
Which means the same thing per the spec?If the rewrite would fix it, I suggest doing the rewrite, toreduce compilation problems.
--- David A. Wheeler
[Prev in Thread] | Current Thread | [Next in Thread] |