aboutsummaryrefslogtreecommitdiffstats
path: root/intl/eval-plural.h
diff options
context:
space:
mode:
Diffstat (limited to 'intl/eval-plural.h')
-rw-r--r--intl/eval-plural.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/intl/eval-plural.h b/intl/eval-plural.h
index 44f49342..19c7ca6a 100644
--- a/intl/eval-plural.h
+++ b/intl/eval-plural.h
@@ -68,8 +68,16 @@ plural_eval (pexp, n)
case mult:
return leftarg * rightarg;
case divide:
+#if !INTDIV0_RAISES_SIGFPE
+ if (rightarg == 0)
+ raise (SIGFPE);
+#endif
return leftarg / rightarg;
case module:
+#if !INTDIV0_RAISES_SIGFPE
+ if (rightarg == 0)
+ raise (SIGFPE);
+#endif
return leftarg % rightarg;
case plus:
return leftarg + rightarg;