diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-01-05 23:56:04 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-01-05 23:56:04 +0000 |
commit | 93369158ccfa4271e1aa11edeb25a14e007d62bc (patch) | |
tree | 443078098fd8b7c39ce3395ee8003c77951cf554 /gcc/real.c | |
parent | 9fb591cd6afa49e36939fb346d66da6e0b65a878 (diff) | |
download | gcc-93369158ccfa4271e1aa11edeb25a14e007d62bc.tar.gz |
* real.c (mtherr): Print more reasonable warning messages.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24502 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/real.c')
-rw-r--r-- | gcc/real.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/gcc/real.c b/gcc/real.c index 7001c5e5091..22b4ba5ab22 100644 --- a/gcc/real.c +++ b/gcc/real.c @@ -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 */ |