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.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

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

Reply via email to