diff options
author | Geoff Keating <geoffk@ozemail.com.au> | 1999-01-05 23:56:04 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1999-01-05 16:56:04 -0700 |
commit | 7735516c99197d3c1002c7a40dcccf8d3c4f333b (patch) | |
tree | 443078098fd8b7c39ce3395ee8003c77951cf554 | |
parent | 5b5d821c3065a6e154839ea0cb848c3832262ea2 (diff) | |
download | gcc-7735516c99197d3c1002c7a40dcccf8d3c4f333b.zip gcc-7735516c99197d3c1002c7a40dcccf8d3c4f333b.tar.gz gcc-7735516c99197d3c1002c7a40dcccf8d3c4f333b.tar.bz2 |
* real.c (mtherr): Print more reasonable warning messages.
From-SVN: r24502
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/real.c | 22 |
2 files changed, 23 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index caa7e12..d456392 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Wed Jan 6 00:54:21 1999 Geoff Keating <geoffk@ozemail.com.au> + + * real.c (mtherr): Print more reasonable warning messages. + Tue Jan 5 21:57:42 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * Makefile.in (gcc.o, prefix.o, cccp.o, cpplib.o): Depend on prefix.h. @@ -5676,13 +5676,13 @@ eiremain (den, num) static char *ermsg[NMSGS] = { "unknown", /* error code 0 */ - "domain", /* error code 1 */ + "domain error", /* error code 1 */ "singularity", /* et seq. */ "overflow", "underflow", "total loss of precision", "partial loss of precision", - "invalid operation" + "`not-a-number' produced" }; int merror = 0; @@ -5701,7 +5701,23 @@ mtherr (name, code) if ((code <= 0) || (code >= NMSGS)) code = 0; - sprintf (errstr, " %s %s error", name, ermsg[code]); + if (strcmp (name, "esub") == 0) + name = "subtraction"; + else if (strcmp (name, "ediv") == 0) + name = "division"; + else if (strcmp (name, "emul") == 0) + name = "multiplication"; + else if (strcmp (name, "enormlz") == 0) + name = "normalization"; + else if (strcmp (name, "etoasc") == 0) + name = "conversion to text"; + else if (strcmp (name, "asctoe") == 0) + name = "parsing"; + else if (strcmp (name, "eremain") == 0) + name = "modulus"; + else if (strcmp (name, "esqrt") == 0) + name = "square root"; + sprintf (errstr, "%s during real %s", ermsg[code], name); if (extra_warnings) warning (errstr); /* Set global error message word */ |