[PING^2] PR 21438 : Warning about division by zero depends on lexical form

Manuel López-Ibáñez lopezibanez@gmail.com
Sun Feb 18 11:55:00 GMT 2007


Still pending resolution.

Thanks,

Manuel.

On 10/02/07, Manuel López-Ibáñez <lopezibanez@gmail.com> wrote:
> The discussion didn't reach a definitive conclusion:
> http://gcc.gnu.org/ml/gcc-patches/2007-01/msg01166.html
>
> It seems that the consensus is that:
>
> * Context matters, so we should warn for int i = int(1.0/0.0); (not
> sure how to implement this, but I will try).
>
> * Lexical form should not matter, so warnings for 1.0/0.0 and 1.0/0
> should be consistent.
>
> * C and C++ front-ends should agree.
>
> So the only question is:
>
> Do we warn for 1.0/0.0 (like C++ front-end does) or we consider that
> it is a legitimate way to obtain infinities so we don't warn (like C
> front-end does) ?
>
> Thanks,
>
> Manuel.
>



More information about the Gcc-patches mailing list