Module Name: src
Committed By: matt
Date: Sun Feb 5 17:43:47 UTC 2012
Modified Files:
src/external/gpl3/gcc/dist/gcc: c-lex.c
Log Message:
Gcc emit overflows warnings on VAX when you try to use HUGE_VAL. Make these
warning supressable if -Wno-overflow is given.
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/gcc/c-lex.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl3/gcc/dist/gcc/c-lex.c
diff -u src/external/gpl3/gcc/dist/gcc/c-lex.c:1.1.1.1 src/external/gpl3/gcc/dist/gcc/c-lex.c:1.2
--- src/external/gpl3/gcc/dist/gcc/c-lex.c:1.1.1.1 Tue Jun 21 01:20:08 2011
+++ src/external/gpl3/gcc/dist/gcc/c-lex.c Sun Feb 5 17:43:47 2012
@@ -718,22 +718,25 @@ interpret_float (const cpp_token *token,
outside the range of representable values of its type. Since we
have __builtin_inf* to produce an infinity, this is now a
mandatory pedwarn if the target does not support infinities. */
- if (REAL_VALUE_ISINF (real)
- || (const_type != type && REAL_VALUE_ISINF (real_trunc)))
+ if (warn_overflow)
{
- if (!MODE_HAS_INFINITIES (TYPE_MODE (type)))
- pedwarn (input_location, 0, "floating constant exceeds range of %qT", type);
- else
- warning (OPT_Woverflow, "floating constant exceeds range of %qT", type);
- }
- /* We also give a warning if the value underflows. */
- else if (REAL_VALUES_EQUAL (real, dconst0)
- || (const_type != type && REAL_VALUES_EQUAL (real_trunc, dconst0)))
- {
- REAL_VALUE_TYPE realvoidmode;
- int overflow = real_from_string (&realvoidmode, copy);
- if (overflow < 0 || !REAL_VALUES_EQUAL (realvoidmode, dconst0))
- warning (OPT_Woverflow, "floating constant truncated to zero");
+ if (REAL_VALUE_ISINF (real)
+ || (const_type != type && REAL_VALUE_ISINF (real_trunc)))
+ {
+ if (!MODE_HAS_INFINITIES (TYPE_MODE (type)))
+ pedwarn (input_location, 0, "floating constant exceeds range of %qT", type);
+ else
+ warning (OPT_Woverflow, "floating constant exceeds range of %qT", type);
+ }
+ /* We also give a warning if the value underflows. */
+ else if (REAL_VALUES_EQUAL (real, dconst0)
+ || (const_type != type && REAL_VALUES_EQUAL (real_trunc, dconst0)))
+ {
+ REAL_VALUE_TYPE realvoidmode;
+ int overflow = real_from_string (&realvoidmode, copy);
+ if (overflow < 0 || !REAL_VALUES_EQUAL (realvoidmode, dconst0))
+ warning (OPT_Woverflow, "floating constant truncated to zero");
+ }
}
/* Create a node with determined type and value. */