summaryrefslogtreecommitdiff
path: root/gcc/c.opt
diff options
context:
space:
mode:
authormanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-20 20:29:55 +0000
committermanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-20 20:29:55 +0000
commite6e352cb895ddae21a403a3425c71701717b7637 (patch)
tree90312ab1a9121fa6e7864a7b15bdaf3260ab1b8b /gcc/c.opt
parentb64b77f22174f1992747752c0d24334ea555bbcd (diff)
downloadgcc-e6e352cb895ddae21a403a3425c71701717b7637.tar.gz
2007-05-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR middle-end/7651 PR c++/11856 PR c/12963 PR c/23587 PR other/29694 * c.opt (Wtype-limits): New. * doc/invoke.texi (Wtype-limits): Document it. (Wextra): Enabled by -Wextra. * c-opts.c (c_common_post_options): Enabled by -Wextra. * c-common.c (shorten_compare): Warn with Wtype-limits. testsuite/ * gcc.dg/compare6.c: Replace Wall with Wtype-limits. * gcc.dg/Wtype-limits.c: New. * gcc.dg/Wtype-limits-Wextra.c: New. * gcc.dg/Wtype-limits-no.c: New. * g++.dg/warn/Wtype-limits.C: New. * g++.dg/warn/Wtype-limits-Wextra.C: New. * g++.dg/warn/Wtype-limits-no.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124875 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c.opt')
-rw-r--r--gcc/c.opt4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/c.opt b/gcc/c.opt
index 0ef76937947..63e2bda5b42 100644
--- a/gcc/c.opt
+++ b/gcc/c.opt
@@ -124,6 +124,10 @@ Wall
C ObjC C++ ObjC++ Warning
Enable most warning messages
+Wtype-limits
+C ObjC C++ ObjC++ Var(warn_type_limits) Init(-1) Warning
+Warn if a comparison is always true or always false due to the limited range of the data type
+
Wassign-intercept
ObjC ObjC++ Var(warn_assign_intercept) Warning
Warn whenever an Objective-C assignment is being intercepted by the garbage collector