mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
if-div.c: New file.
2007-05-02 Eric Christopher <echristo@apple.com> * gcc.dg/cpp/if-div.c: New file. 2007-05-02 Eric Christopher <echristo@apple.com> * expr.c (num_div_op): Don't overflow if the result is zero. From-SVN: r124358
This commit is contained in:
@@ -91,7 +91,7 @@ interpret_float_suffix (const uchar *s, size_t len)
|
||||
case 'l': case 'L': l++; break;
|
||||
case 'i': case 'I':
|
||||
case 'j': case 'J': i++; break;
|
||||
case 'd': case 'D':
|
||||
case 'd': case 'D':
|
||||
/* Disallow fd, ld suffixes. */
|
||||
if (d && (f || l))
|
||||
return 0;
|
||||
@@ -441,7 +441,7 @@ append_digit (cpp_num num, int digit, int base, size_t precision)
|
||||
if (add_low + digit < add_low)
|
||||
add_high++;
|
||||
add_low += digit;
|
||||
|
||||
|
||||
if (result.low + add_low < result.low)
|
||||
add_high++;
|
||||
if (result.high + add_high < result.high)
|
||||
@@ -1527,7 +1527,8 @@ num_div_op (cpp_reader *pfile, cpp_num lhs, cpp_num rhs, enum cpp_ttype op)
|
||||
{
|
||||
if (negate)
|
||||
result = num_negate (result, precision);
|
||||
result.overflow = num_positive (result, precision) ^ !negate;
|
||||
result.overflow = (num_positive (result, precision) ^ !negate
|
||||
&& !num_zerop (result));
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user