Browse Source

Add `f16` to `#c_vararg` promotion rules

gingerBill 1 năm trước cách đây
mục cha
commit
891cf54b5c
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      src/types.cpp

+ 3 - 0
src/types.cpp

@@ -2923,11 +2923,14 @@ gb_internal Type *c_vararg_promote_type(Type *type) {
 
 
 	if (core->kind == Type_Basic) {
 	if (core->kind == Type_Basic) {
 		switch (core->Basic.kind) {
 		switch (core->Basic.kind) {
+		case Basic_f16:
 		case Basic_f32:
 		case Basic_f32:
 		case Basic_UntypedFloat:
 		case Basic_UntypedFloat:
 			return t_f64;
 			return t_f64;
+		case Basic_f16le:
 		case Basic_f32le:
 		case Basic_f32le:
 			return t_f64le;
 			return t_f64le;
+		case Basic_f16be:
 		case Basic_f32be:
 		case Basic_f32be:
 			return t_f64be;
 			return t_f64be;