+2014-07-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ * config/fpu-*.h (get_fpu_rounding_mode, set_fpu_rounding_mode,
+ support_fpu_rounding_mode): Clean up, mark unreachable code as such.
+
2014-07-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
* libgfortran.h (support_fpu_underflow_control,
case _FPU_RC_ZERO:
return GFC_FPE_TOWARDZERO;
default:
- return GFC_FPE_INVALID; /* Should be unreachable. */
+ return 0; /* Should be unreachable. */
}
}
}
-
-
int
get_fpu_rounding_mode (void)
{
case FE_TOWARDZERO:
return GFC_FPE_TOWARDZERO;
#endif
+
default:
- return GFC_FPE_INVALID;
+ return 0; /* Should be unreachable. */
}
}
rnd_mode = FE_TOWARDZERO;
break;
#endif
+
default:
- return;
+ return; /* Should be unreachable. */
}
fesetround (rnd_mode);
#endif
default:
- return 0;
+ return 0; /* Should be unreachable. */
}
}
case FE_TOWARDZERO:
return GFC_FPE_TOWARDZERO;
#endif
+
default:
- return GFC_FPE_INVALID;
+ return 0; /* Should be unreachable. */
}
}
rnd_mode = FE_TOWARDZERO;
break;
#endif
+
default:
- return;
+ return; /* Should be unreachable. */
}
fesetround (rnd_mode);
#endif
default:
- return 0;
+ return 0; /* Should be unreachable. */
}
}
case FP_RZ:
return GFC_FPE_TOWARDZERO;
default:
- return GFC_FPE_INVALID;
+ return 0; /* Should be unreachable. */
}
}
rnd_mode = FP_RZ;
break;
default:
- return;
+ return; /* Should be unreachable. */
}
fpsetround (rnd_mode);
}
int
-support_fpu_rounding_mode (int mode)
+support_fpu_rounding_mode (int mode __attribute__((unused)))
{
- switch (mode)
- {
- case GFC_FPE_TONEAREST:
- return 1;
- case GFC_FPE_UPWARD:
- return 1;
- case GFC_FPE_DOWNWARD:
- return 1;
- case GFC_FPE_TOWARDZERO:
- return 1;
- default:
- return 0;
- }
+ return 1;
}