aboutsummaryrefslogtreecommitdiff
path: root/gold/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/main.cc')
-rw-r--r--gold/main.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/gold/main.cc b/gold/main.cc
index 9b6ded0..c785da2 100644
--- a/gold/main.cc
+++ b/gold/main.cc
@@ -220,6 +220,11 @@ main(int argc, char** argv)
layout.print_stats();
}
+ if (parameters->options().fatal_warnings()
+ && errors.warning_count() > 0
+ && errors.error_count() == 0)
+ gold_error("treating warnings as errors");
+
// If the user used --noinhibit-exec, we force the exit status to be
// successful. This is compatible with GNU ld.
gold_exit(errors.error_count() == 0