> From: Paul Smith <psm...@gnu.org>
> Date: Sat, 19 Jun 2021 10:52:41 -0400
> Cc: bug-make@gnu.org
> 
> On Sat, 2021-06-19 at 15:31 +0100, Dmitrii Pasechnik wrote:
> > On Fri, Jun 18, 2021 at 12:53:32PM -0400, Paul D. Smith wrote:
> > 
> > > Follow-up Comment #1, bug #60798 (project make):
> > > FWIW, this warning is not valid in this situation.  The code is
> > > correct; p will always be pointing into a valid buffer and never
> > > pointing at the first character in that buffer, so p[-1] always
> > > points to valid memory.
> > 
> > It's undefined behaviour in C to point to such a location, isn't it?
> 
> To point to which such location?  As I said, we know for a fact that p
> does not point at the first character of the array.  It's clearly legal
> in C to walk backwards through an array!!  And referencing the previous
> element in an array is certainly not a hack.
> 
> I don't think I understand.

I think it's a bug in GCC 11 that needs to be reported to the GCC
developers.

  • [bug #60798] ... anonyme
    • [bug #60... Paul D. Smith
      • Re: ... Dmitrii Pasechnik
        • ... Paul Smith
          • ... Eli Zaretskii
          • ... Dmitrii Pasechnik
            • ... Paul Smith
              • ... Andreas Schwab
                • ... David A. Wheeler
                • ... RANDRIANAINA Georges Aaron
        • ... Dmitry Goncharov via Bug reports and discussion for GNU make
          • ... Dmitrii Pasechnik
            • ... Eli Zaretskii
      • [bug... Jouke Witteveen
        • ... Edward Welbourne

Reply via email to