[Top][All Lists]

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

Re: [bug #60798] Make does not compile with GCC 11.1.0

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';
|       ~~~~~~~~~^~~~~~

Le 21/06/2021 à 16:12, David A. Wheeler a écrit :

     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, to
reduce compilation problems.

--- David A. Wheeler

reply via email to

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