summaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-09-27 03:46:35 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-09-27 03:46:35 +0000
commitaa1c7fa8a69c8e4cc69045cf37537f995a7de987 (patch)
tree9364040c5ea8353e79b03373275054360d7f64c3 /gcc/c-decl.c
parent205306a739f001e2576c520bedc90b656c8af9d4 (diff)
downloadgcc-aa1c7fa8a69c8e4cc69045cf37537f995a7de987.tar.gz
* c-typeck.c (build_binary_op): Warn about comparing signed vs
unsigned if -W is specified and -Wno-sign-compare is not. * c-decl.c (warn_sign_compare): Initialize to -1. (c_decode_option): -Wall no longer implies -Wsign-compare. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15739 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 94dc196a6a1..09143e41fce 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -553,9 +553,10 @@ int warn_missing_braces;
int warn_main;
-/* Warn about comparison of signed and unsigned values. */
+/* Warn about comparison of signed and unsigned values.
+ If -1, neither -Wsign-compare nor -Wno-sign-compare has been specified. */
-int warn_sign_compare;
+int warn_sign_compare = -1;
/* Nonzero means `$' can be in an identifier. */
@@ -758,7 +759,6 @@ c_decode_option (p)
warn_char_subscripts = 1;
warn_parentheses = 1;
warn_missing_braces = 1;
- warn_sign_compare = 1;
/* We set this to 2 here, but 1 in -Wmain, so -ffreestanding can turn
it off only if it's not explicit. */
warn_main = 2;