On Donnerstag, 23. Februar 2017 09:03:03 CET Thiago Macieira wrote:
> On quarta-feira, 22 de fevereiro de 2017 23:58:29 PST Thiago Macieira wrote:
> >         int x = abs(getValue1()),
> >         
> >             y = abs(getValue2());
> >         
> >         if (x * y < x)
> >         
> >                 throw overflowError();
> > 
> > According to the standard, the exception above can never be thrown.
> 
> No, sorry, the code above has one valid code path that leads to the
> exception: if y is 0.
> 
> But it does not check for overflow.

And x != 0 ;)

r


_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to