[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: |
Andreas Schwab |
Subject: |
Re: [bug #60798] Make does not compile with GCC 11.1.0 |
Date: |
Mon, 21 Jun 2021 11:04:22 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
On Jun 19 2021, Paul Smith wrote:
> But, as human programmers we can examine this code and understand that
> actually, it's never possible for p to point to the first character of
> the array: we know that eval_strings->idx is never 0, so we know that p
> will always be incremented past the beginning of the memory buffer:
>
> p = value = alloca (len);
> for (i = 0; i < eval_strings->idx; ++i)
> {
> ...
> *(p++) = ' ';
> }
> p[-1] = '\0';
The crux is of course to tell the compiler that eval_strings->idx is
always > 0, which is pretty hard for the compiler to deduce.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
- [bug #60798] Make does not compile with GCC 11.1.0, anonyme, 2021/06/18
- [bug #60798] Make does not compile with GCC 11.1.0, Paul D. Smith, 2021/06/18
- Re: [bug #60798] Make does not compile with GCC 11.1.0, Dmitrii Pasechnik, 2021/06/19
- Re: [bug #60798] Make does not compile with GCC 11.1.0, Paul Smith, 2021/06/19
- Re: [bug #60798] Make does not compile with GCC 11.1.0, Eli Zaretskii, 2021/06/19
- Re: [bug #60798] Make does not compile with GCC 11.1.0, Dmitrii Pasechnik, 2021/06/19
- Re: [bug #60798] Make does not compile with GCC 11.1.0, Paul Smith, 2021/06/19
- Re: [bug #60798] Make does not compile with GCC 11.1.0,
Andreas Schwab <=
- Re: [bug #60798] Make does not compile with GCC 11.1.0, David A. Wheeler, 2021/06/21
- Re: [bug #60798] Make does not compile with GCC 11.1.0, RANDRIANAINA Georges Aaron, 2021/06/21
- Re: [bug #60798] Make does not compile with GCC 11.1.0, Dmitry Goncharov, 2021/06/19
- Re: [bug #60798] Make does not compile with GCC 11.1.0, Dmitrii Pasechnik, 2021/06/19
- Re: [bug #60798] Make does not compile with GCC 11.1.0, Eli Zaretskii, 2021/06/19