--- Frank Heckenbach ih8mj@fjf.gnu.de wrote:
Dan N wrote:
The following program runs without any run-time
errors
or warnings. How to make it produce a (useful) run-time error?
program prog; var a:1..5; begin a:=5; writeln(a); a:=a+1; {Here it should produce at least a
warning}
writeln(a); end.
Which GPC version do you use? Newer versions should produce a run-time error here. The latest snapshot is:
http://www.math.uni.wroc.pl/~hebisch/gpc-20060325.tar.bz2
I have gpc 3.3.3 under Cygwin. This is the latest version avaliable.
$ cat a.pas program prog; var a:1..5; begin a:=5; writeln(a); a:=a+1; writeln(a); end. $ gpc -v Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/specs Configured with: /gcc/gcc-3.3.3-3/configure --verbose --prefix=/usr --exec-prefix=/usr --sysconfdir= /etc --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --ena ble-languages=c,ada,c++,d,f77,java,objc,pascal --enable-nls --without-included-gettext --enable-libg cj --with-system-zlib --enable-interpreter --enable-threads=posix --enable-java-gc=boehm --enable-sj lj-exceptions --disable-version-specific-runtime-libs --disable-win32-registry Thread model: posix gpc version 20040516, based on gcc-3.3.3 (cygwin special) $ gpc -o aa a.pas $ ./aa.exe 5 6 $
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Dan N a écrit:
--- Frank Heckenbach ih8mj@fjf.gnu.de wrote: gpc version 20040516, based on gcc-3.3.3 (cygwin special)
too old (it is the gpc number 20040516 which counts) support for range checking started in 2005 Install at least
http://gnu-pascal.de/contrib/chief/win32/cygwin/gpc-20051116.i686-pc-cygwin....
and also gcc-3.4.4 as backend
Maurice