cert: Fix FP on pointer types (#3800)

Closes issue 10782
This commit is contained in:
Georgiy Komarov 2022-02-05 16:02:01 +03:00 committed by GitHub
parent b19010159c
commit 47e9ed6e06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -195,7 +195,9 @@ def int31(data, platform):
if to_value_type is None or not from_values:
continue
bits = None
if to_value_type.type == 'char':
if token.valueType.pointer > 0:
bits = platform.pointer_bit
elif to_value_type.type == 'char':
bits = platform.char_bit
elif to_value_type.type == 'short':
bits = platform.short_bit

View File

@ -82,6 +82,11 @@ void int31(int x)
unsigned char c;
c = 256;
c = -1;
// issue #10782
uint16_t * ptr;
uint32_t var = 65536;
ptr = (uint16_t *)var;
}
void env33()