From ec433f758a248b4bf381f8d3d407a3457aeaef55 Mon Sep 17 00:00:00 2001 From: peter Date: Tue, 25 Jan 2005 15:41:51 +0000 Subject: [PATCH] * arithmetic overflow checking at compile time --- tests/tbf/tb0171.pp | 10 ++++++++++ tests/tbf/tb0172.pp | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 tests/tbf/tb0171.pp create mode 100644 tests/tbf/tb0172.pp diff --git a/tests/tbf/tb0171.pp b/tests/tbf/tb0171.pp new file mode 100644 index 0000000000..b5a3bfb9a3 --- /dev/null +++ b/tests/tbf/tb0171.pp @@ -0,0 +1,10 @@ +{ %fail } + +const + c1 = high(int64)-1; + { Overflow } + c2 = c1+2; +begin + writeln(c2); +end. + diff --git a/tests/tbf/tb0172.pp b/tests/tbf/tb0172.pp new file mode 100644 index 0000000000..4d11d47a22 --- /dev/null +++ b/tests/tbf/tb0172.pp @@ -0,0 +1,10 @@ +{ %fail } + +const + c1 = high(int64)-1; + { Overflow } + c2 = c1*2; +begin + writeln(c2); +end. +