New compiler warnings in R10B

Ulf Wiger ulf.wiger@REDACTED
Thu Dec 18 13:38:18 CET 2003


On 18 Dec 2003 10:00:03 +0100, Bjorn Gustavsson <bjorn@REDACTED> 
wrote:

> Inspired by the discussion in the "Small Poll" thread,
> I decided to start implementing new compiler warnings
> right away. (It was planned to be done in R10B anyway.)

<snip/>

> $ erlc fact.erl
> /home/bjorn/test/fact.erl:10: Warning: this clause cannot match because 
> the previous clause always matches

Superb! This is quite a common newbie error, and also (I believe)
reasonably common even among experienced programmers.




> There will be different warnings depending on how much optimization
> is turned off. I you turn off optimization, you will get no warnings.

OK, a bit quirky, but I can live with that.  (:

Nice work.

/Uffe
-- 
Ulf Wiger, Senior System Architect
EAB/UPD/S



More information about the erlang-questions mailing list