[erlang-questions] Missing compile warning

Björn Gustavsson bjorn@REDACTED
Tue Mar 4 06:08:18 CET 2014


On Mon, Mar 3, 2014 at 6:50 PM, Vlad Dumitrescu <vladdu55@REDACTED> wrote:
>
> What other warnings have less than 100% coverage?

Warnings for arithmetic expressions that will fail such as
x+42 and 1/0. Guards that will always fail.

Those warnings are emitted when the optimiser tries
to evaluate expressions at compile time. So although
there will be a warning for 1/0, there will be no warning
for X/0.

There is some documentation about this, at the end
of the description of compile:file/2:

http://www.erlang.org/doc/man/compile.html

/Bjorn

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list