aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc/common
diff options
context:
space:
mode:
authorChristopher Faulet <[email protected]>2009-12-15 16:56:13 +0100
committerBjörn Gustavsson <[email protected]>2010-01-19 16:23:33 +0100
commit96773ebcef2fe5949695a4fd923343ec4b049087 (patch)
tree38d4645c7cff88529049aadef1c1d67616bd0d61 /erts/etc/common
parent5fdb43ee9adb9081998a2428ba2e5b001c067393 (diff)
downloadotp-96773ebcef2fe5949695a4fd923343ec4b049087.tar.gz
otp-96773ebcef2fe5949695a4fd923343ec4b049087.tar.bz2
otp-96773ebcef2fe5949695a4fd923343ec4b049087.zip
Add option -Werror in erlc(1)
Like in gcc, this option treats warnings as errors.
Diffstat (limited to 'erts/etc/common')
-rw-r--r--erts/etc/common/erlc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/erts/etc/common/erlc.c b/erts/etc/common/erlc.c
index c958fed741..216ff7f40e 100644
--- a/erts/etc/common/erlc.c
+++ b/erts/etc/common/erlc.c
@@ -310,6 +310,8 @@ main(int argc, char** argv)
case 'W': /* Enable warnings. */
if (strcmp(argv[1]+2, "all") == 0) {
PUSH2("@warn", "999");
+ } else if (strcmp(argv[1]+2, "error") == 0) {
+ PUSH2("@option", "warnings_as_errors");
} else if (isdigit((int)argv[1][2])) {
PUSH2("@warn", argv[1]+2);
} else {
@@ -566,6 +568,7 @@ usage(void)
{"-pz path", "add path to the end of Erlang's code path"},
{"-smp", "compile using SMP emulator"},
{"-v", "verbose compiler output"},
+ {"-Werror", "make all warnings into errors"},
{"-W0", "disable warnings"},
{"-Wnumber", "set warning level to number"},
{"-Wall", "enable all warnings"},