mathfn_built_in_type case type fix
authorAlexandre Oliva <oliva@adacore.com>
Mon, 12 Oct 2020 21:55:40 +0000 (18:55 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Mon, 12 Oct 2020 21:55:40 +0000 (18:55 -0300)
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.

gcc/builtins.c

index 3a77da2b10ceeec04c731b3e670b305b93dc1d6f..3f799e54d5fe650bef08e0734adf0369c72e762f 100644 (file)
@@ -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)