Skip to content

Commit cc1dc09

Browse files
committed
Update warnings test for warning overflow for signed/unsigned types in SELECT CASE AS CONST.
1 parent ef9ef1f commit cc1dc09

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

tests/warnings/const-overflow-select.bas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ dim as long l
1414
select case as const( l )
1515
#print "CASE with 64bit value, causes a warning because it's a SELECT CONST with 32bit value:"
1616
case &hFF00000000ull
17+
#print "SELECT CONST with 64bit expression, causes a warning because it's used with 32bit value:"
1718
end select
1819

1920
#endif

tests/warnings/r/dos/const-overflow-select.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ SELECT CONST with 64bit value, no warning (should use 64bit temp var):
22
also no warning for CASE value > 32bit:
33
CASE with 64bit value, causes a warning because it's a SELECT CONST with 32bit value:
44
Overflow in constant conversion
5+
SELECT CONST with 64bit expression, causes a warning because it's used with 32bit value:
6+
Overflow in constant conversion

tests/warnings/r/linux-x86/const-overflow-select.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ SELECT CONST with 64bit value, no warning (should use 64bit temp var):
22
also no warning for CASE value > 32bit:
33
CASE with 64bit value, causes a warning because it's a SELECT CONST with 32bit value:
44
Overflow in constant conversion
5+
SELECT CONST with 64bit expression, causes a warning because it's used with 32bit value:
6+
Overflow in constant conversion

tests/warnings/r/win32/const-overflow-select.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ SELECT CONST with 64bit value, no warning (should use 64bit temp var):
22
also no warning for CASE value > 32bit:
33
CASE with 64bit value, causes a warning because it's a SELECT CONST with 32bit value:
44
Overflow in constant conversion
5+
SELECT CONST with 64bit expression, causes a warning because it's used with 32bit value:
6+
Overflow in constant conversion

0 commit comments

Comments
 (0)