Re: [PATCH] Fix -Wshadow=local and undefined behavior in fortran/primary.c

2019-10-03 Thread Steve Kargl
On Thu, Oct 03, 2019 at 03:19:15PM +, Bernd Edlinger wrote: > > This fixes two -Wshadow=local warnings, and a undefined behavior that is > used in the loop termination logic here: > > for (p = c - 1; p >= buffer; p--) > { > if (*p == '.') > continue; > > In order to terminate the

[PATCH] Fix -Wshadow=local and undefined behavior in fortran/primary.c

2019-10-03 Thread Bernd Edlinger
Hi, This fixes two -Wshadow=local warnings, and a undefined behavior that is used in the loop termination logic here: for (p = c - 1; p >= buffer; p--) { if (*p == '.') continue; In order to terminate the loop p is decremented until it points to buffer-1 (buffer is alloca'd, so that