aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/primary.c
diff options
context:
space:
mode:
authorSteven G. Kargl <kargls@comcast.net>2004-05-22 11:03:17 +0000
committerPaul Brook <pbrook@gcc.gnu.org>2004-05-22 11:03:17 +0000
commit2d8b59dfd5402cce6da3949fb1f84d7492ab5cbc (patch)
tree5e2d923df60ffc2a25a7691f24bdb163cf4a7da7 /gcc/fortran/primary.c
parent9fd47435098270dd5687b9bbaa34d1b9ecb494e7 (diff)
downloadgcc-2d8b59dfd5402cce6da3949fb1f84d7492ab5cbc.zip
gcc-2d8b59dfd5402cce6da3949fb1f84d7492ab5cbc.tar.gz
gcc-2d8b59dfd5402cce6da3949fb1f84d7492ab5cbc.tar.bz2
invoke.texi: Document -Wunderflow and spell check.
* invoke.texi: Document -Wunderflow and spell check. * lang.opt: Add Wunderflow. * gfortran.h (gfc_option_t): Add warn_underflow option. * options.c (gfc_init_options, set_Wall): Use it. * primary.c (match_real_constant): Explicitly handle UNDERFLOW. * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus, gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real, gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto. * arith.c (common_logarithm): Fix typo in comment. From-SVN: r82130
Diffstat (limited to 'gcc/fortran/primary.c')
-rw-r--r--gcc/fortran/primary.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c
index 0e7e7e7..a55c5aa 100644
--- a/gcc/fortran/primary.c
+++ b/gcc/fortran/primary.c
@@ -489,8 +489,10 @@ done:
goto cleanup;
case ARITH_UNDERFLOW:
- gfc_error ("Real constant underflows its kind at %C");
- goto cleanup;
+ if (gfc_option.warn_underflow)
+ gfc_warning ("Real constant underflows its kind at %C");
+ mpf_set_ui(e->value.real, 0);
+ break;
default:
gfc_internal_error ("gfc_range_check() returned bad value");