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]

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


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]