Built using these Harbour defines:
go.bat
http://forums.fivetechsupport.com/viewt ... 92#p201592set path=c:\bcc7\bin
set HB_WITH_OPENSSL=c:\OpenSSL-Win32\include
set HB_WITH_CURL=c:\curl\include
win-make.exe
http://forums.fivetechsupport.com/viewt ... 92#p201592set path=c:\bcc7\bin
set HB_WITH_OPENSSL=c:\OpenSSL-Win32\include
set HB_WITH_CURL=c:\curl\include
win-make.exe
Code: Select all
FUNCTION MAIN()
LOCAL i
FOR i = 1 TO 10
FOR i = i TO 5
? i
NEXT
NEXT
INKEY( 0 )
RETURN NIL
Code: Select all
Harbour 3.2.0dev (r1801051438)
Copyright (c) 1999-2016, http://harbour-project.org/
BUG.prg(6) Warning W0030 Duplicate variable 'I' in nested FOR loop
No code generated.
Still I think it's a bug. Anyway, is there a way to suppress it?Antonio Linares wrote:Enrico,
I don't think that is a bug as it is reported as a warning
It would be wasted time, you know.Antonio Linares wrote:Anyhow the right place to report it is in the Harbour developers group at:
https://groups.google.com/forum/#!forum/harbour-devel
thanks
Code: Select all
FUNCTION MAIN()
LOCAL i,ii
FOR i = 1 TO 10
FOR ii = i TO 5
? ii
NEXT ii
NEXT i
INKEY( 0 )
RETURN NIL
Other compilers do not warn that their code produces an endless loop?Enrico Maria Giordano wrote:It was only a sample. The point is that there is no valid reason to issue a warning in this case and no compiler in any language issues it.
EMG
No, why should it be? Endless loops are useful sometimes. Anyway, neither Harbour warns on that. It warns the use of the same index variable in nested loops.cnavarro wrote:Other compilers do not warn that their code produces an endless loop?
I prefer that the compiler warn me