pike.git/
src/
pike_types.cmod
Branch:
Tag:
Non-build tags
All tags
No tags
2022-06-02
2022-06-02 10:55:00 by Henrik Grubbström (Grubba) <grubba@grubba.org>
31336f1385f4b5e9ea88b9979a4e440efe625ae4 (
10
lines) (+
7
/-
3
)
[
Show
|
Annotate
]
Branch:
master
Compiler
[Typechecker]
: void is converted to zero when in container type.
Fixes multiple warnings.
6341:
if (!tmp && (op == PT_BINOP_AND) && a->car && b->car) return NULL; if ((a->type == T_STRING) || (op == PT_BINOP_AND)) { tmp2 = low_type_binop(op, a->cdr, b->cdr, remap,
-
0
,
0
, remap_flags);
+
PT_FLAG_CMP_VOID_IS_ZERO
,
+
PT_FLAG_CMP_VOID_IS_ZERO
,
+
remap_flags);
} else { /* Mappings may always result in UNDEFINED on indexing. * Arrays are typically initialized to all zeroes.
-
+
* Any void values have been up-converted to zeroes.
*/ tmp2 = low_type_binop(op, a->cdr, b->cdr, remap,
-
PT_FLAG_CMP_NULLABLE,
-
PT_FLAG_CMP_NULLABLE,
+
PT_FLAG_CMP_NULLABLE
|PT_FLAG_CMP_VOID_IS_ZERO
,
+
PT_FLAG_CMP_NULLABLE
|PT_FLAG_CMP_VOID_IS_ZERO
,
remap_flags); } if (!tmp2 && (op == PT_BINOP_MINUS || (a->cdr && b->cdr))) {