summaryrefslogtreecommitdiff
path: root/gcc/real.h
diff options
context:
space:
mode:
authormanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-22 23:04:24 +0000
committermanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-22 23:04:24 +0000
commit64214dabd303be6b1134238ee99d05be78e83ff8 (patch)
tree72ccc17238a98a5218797e0019368cff25e58e57 /gcc/real.h
parentf2c255d4fa65514614d673a9e440dbe2b92b60b7 (diff)
downloadgcc-64214dabd303be6b1134238ee99d05be78e83ff8.tar.gz
2007-03-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR other/23572 * c-lex.c (interpret_float): On overflow, emit pedantic warning if infinities not supported, otherwise emit warning if -Woverflow. On underflow, emit warning if -Woverflow. * real.c (real_from_string): Return -1 if underflow, +1 if overflow and 0 otherwise. * real.h (real_from_string): Update declaration testsuite/ * gcc.dg/float-range-4.c: New. * gcc.dg/float-range-1.c: Update. Test for a warning. * gcc.dg/float-range-3.c: New. * gcc.dg/float-range-5.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123137 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/real.h')
-rw-r--r--gcc/real.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/real.h b/gcc/real.h
index fda1095b1bc..eab53d7dadf 100644
--- a/gcc/real.h
+++ b/gcc/real.h
@@ -224,8 +224,9 @@ extern HOST_WIDE_INT real_to_integer (const REAL_VALUE_TYPE *);
extern void real_to_integer2 (HOST_WIDE_INT *, HOST_WIDE_INT *,
const REAL_VALUE_TYPE *);
-/* Initialize R from a decimal or hexadecimal string. */
-extern void real_from_string (REAL_VALUE_TYPE *, const char *);
+/* Initialize R from a decimal or hexadecimal string. Return -1 if
+ the value underflows, +1 if overflows, and 0 otherwise. */
+extern int real_from_string (REAL_VALUE_TYPE *, const char *);
/* Wrapper to allow different internal representation for decimal floats. */
extern void real_from_string3 (REAL_VALUE_TYPE *, const char *, enum machine_mode);