disabling compiler warnings

Matthias.Lang <>
Wed Apr 19 14:15:57 CEST 2000


Hi,

Hal Snyder writes

    Hal> 4. The second program has perfectly legal balanced exports of
    Hal> variables from both branches of an if structure. This leads
    Hal> to a slew of inappropriate warnings - and I don't see any way
    Hal> to turn them off without rebuilding the compiler. There is a
    Hal> compiler switch to enable warning reports, on by default, but
    Hal> no apparent way to turn it off.

I agree that the warnings in the fibsrch program (the first one)
are rather over-zealous of the compiler, but there are slightly more
verbose ways to code around the warnings, which save your bacon in
other cases.

In any case, disabling the warnings doesn't require a rebuild. Just
create a user_default.beam from source something like:

	-module(user_default).
	-export([c/1]).
	c(File) -> compile:file(File, []).

You can arrange for this to be loaded automatically via the .erlang file:

        code:load_abs("/home/super/mml/toys/user_default").

Read more about the .erlang and user_default file at

        http://www.erlang.org/documentation/doc/getting_started/getting_started.html#1.7

Matt



More information about the erlang-questions mailing list