Closed riederm closed 2 years ago
Describe the bug allow assignments between different pointer-types:
e.g.
VAR pt : REF_TO DWORD; x : REAL; END_VAR pt := &x; // POINTER TO DWORD := POINTER TO REAL
We should allow the assignment, but at least warn, especially if you use a pointer-type that is bigger than the target: e.g.
VAR pt : REF_TO DWORD; x : BYTE; END_VAR pt := &x; // POINTER TO DWORD := POINTER TO BYTE --> this smells bad!
Additional context seen in oscat: e,g,
FUNCTION TEMP_PT : REAL
Branch issue-463-allow_automatic_pointer_casts_as_seen_in_oscat created!
Describe the bug allow assignments between different pointer-types:
e.g.
We should allow the assignment, but at least warn, especially if you use a pointer-type that is bigger than the target: e.g.
Additional context seen in oscat: e,g,