This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Manuel López-Ibáñez wrote:
> 2007-01-14 Andrew Pinski <pinskia@gmail.com> > Manuel Lopez-Ibanez <manu@gcc.gnu.org> > > PR c/21438 > * gcc/c-typeck.c (build_binary_op): Don't give division by zero > warning if integer zero is promoted to REAL_TYPE. > > testsuite: > 2007-01-14 Andrew Pinski <pinskia@gmail.com> > Manuel Lopez-Ibanez <manu@gcc.gnu.org> > > PR c/21438 > * gcc.dg/Wdiv-by-zero.c: New.
I'll let a C maintainer review these bits.
Joseph says: "the C front end doesn't warn for division by a floating point zero constant (although it warns for division of a floating point value by an integer zero) since explicit division by 0.0 is used as a way of generating Inf and NaN." http://gcc.gnu.org/ml/gcc-patches/2006-01/msg02184.html
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |