From: Alexandre Oliva Date: Mon, 12 Oct 2020 21:55:40 +0000 (-0300) Subject: mathfn_built_in_type case type fix X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=455c3d2efc053a95adc2a7e594aa7e1180887d3b;p=gcc.git mathfn_built_in_type case type fix Martin Liška reported warnings about type mismatches in the cases in the recently-introduced mathfn_built_in_type. This patch adjusts the macros to use the combined_fn enumerators rather than the (currently same-numbered) built_in_function ones. for gcc/ChangeLog * builtins.c (mathfn_built_in_type): Use CFN_ enumerators. --- diff --git a/gcc/builtins.c b/gcc/builtins.c index 3a77da2b10c..3f799e54d5f 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -2451,37 +2451,37 @@ tree mathfn_built_in_type (combined_fn fn) { #define CASE_MATHFN(MATHFN) \ - case BUILT_IN_##MATHFN: \ + case CFN_BUILT_IN_##MATHFN: \ return double_type_node; \ - case BUILT_IN_##MATHFN##F: \ + case CFN_BUILT_IN_##MATHFN##F: \ return float_type_node; \ - case BUILT_IN_##MATHFN##L: \ + case CFN_BUILT_IN_##MATHFN##L: \ return long_double_type_node; #define CASE_MATHFN_FLOATN(MATHFN) \ CASE_MATHFN(MATHFN) \ - case BUILT_IN_##MATHFN##F16: \ + case CFN_BUILT_IN_##MATHFN##F16: \ return float16_type_node; \ - case BUILT_IN_##MATHFN##F32: \ + case CFN_BUILT_IN_##MATHFN##F32: \ return float32_type_node; \ - case BUILT_IN_##MATHFN##F64: \ + case CFN_BUILT_IN_##MATHFN##F64: \ return float64_type_node; \ - case BUILT_IN_##MATHFN##F128: \ + case CFN_BUILT_IN_##MATHFN##F128: \ return float128_type_node; \ - case BUILT_IN_##MATHFN##F32X: \ + case CFN_BUILT_IN_##MATHFN##F32X: \ return float32x_type_node; \ - case BUILT_IN_##MATHFN##F64X: \ + case CFN_BUILT_IN_##MATHFN##F64X: \ return float64x_type_node; \ - case BUILT_IN_##MATHFN##F128X: \ + case CFN_BUILT_IN_##MATHFN##F128X: \ return float128x_type_node; /* Similar to above, but appends _R after any F/L suffix. */ #define CASE_MATHFN_REENT(MATHFN) \ - case BUILT_IN_##MATHFN##_R: \ + case CFN_BUILT_IN_##MATHFN##_R: \ return double_type_node; \ - case BUILT_IN_##MATHFN##F_R: \ + case CFN_BUILT_IN_##MATHFN##F_R: \ return float_type_node; \ - case BUILT_IN_##MATHFN##L_R: \ + case CFN_BUILT_IN_##MATHFN##L_R: \ return long_double_type_node; switch (fn)