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:
parent
fca35e1b54
commit
22a8a52d65
|
@ -1,3 +1,7 @@
|
|||
2007-05-02 Eric Christopher <echristo@apple.com>
|
||||
|
||||
* gcc.dg/cpp/if-div.c: New file.
|
||||
|
||||
2007-05-02 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
PR preprocessor/28709:
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
/* { dg-do preprocess } */
|
||||
|
||||
/* Test that this preprocesses without error. */
|
||||
|
||||
#if (-1)/2
|
||||
#endif
|
|
@ -1,3 +1,8 @@
|
|||
2007-05-02 Eric Christopher <echristo@apple.com>
|
||||
|
||||
* expr.c (num_div_op): Don't overflow if the result is
|
||||
zero.
|
||||
|
||||
2007-05-02 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
PR preprocessor/28709:
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue