mirror of
https://github.com/Interlisp/maiko.git
synced 2026-04-15 15:50:28 +00:00
Note places where undefined behavior is detected by the UB sanitizer
Comments only, no functional changes. modified: src/arith2.c modified: src/arith3.c modified: src/arith4.c modified: src/xc.c
This commit is contained in:
@@ -47,6 +47,7 @@ LispPTR N_OP_makenumber(int tosm1, int tos) {
|
||||
register int result;
|
||||
|
||||
if (((tosm1 & 0xFFFF0000) != S_POSITIVE) || ((tos & 0xFFFF0000) != S_POSITIVE)) ERROR_EXIT(tos);
|
||||
/* UB: left shift of 49152 by 16 places cannot be represented in type 'int' */
|
||||
result = ((tosm1 & 0xffff) << 16) | (tos & 0xffff);
|
||||
N_ARITH_SWITCH(result);
|
||||
} /* end OP_makenumber */
|
||||
|
||||
Reference in New Issue
Block a user