summaryrefslogtreecommitdiff
path: root/gcc/c-family
diff options
context:
space:
mode:
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-01 07:16:10 +0000
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-01 07:16:10 +0000
commite4ab2ef3d8ad4e8904e663904b1e7c6e2f67d995 (patch)
tree0e3a810a247c23366f355169db0d3d71078a67f9 /gcc/c-family
parentca3999cbf3bb55d458bcb20e849ed3f4dc99fd58 (diff)
downloadgcc-e4ab2ef3d8ad4e8904e663904b1e7c6e2f67d995.tar.gz
PR c/43245
* doc/invoke.texi: Document -Wdiscarded-qualifiers. c-family/ * c.opt (Wdiscarded-qualifiers): Add. c/ * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers instead of 0 to WARN_FOR_QUALIFIERS. testsuite/ * gcc.dg/pr43245.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209970 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-family')
-rw-r--r--gcc/c-family/ChangeLog5
-rw-r--r--gcc/c-family/c.opt4
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 47bb11438ad..fddfcd8c2f0 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,8 @@
+2014-05-01 Marek Polacek <polacek@redhat.com>
+
+ PR c/43245
+ * c.opt (Wdiscarded-qualifiers): Add.
+
2014-04-30 Marek Polacek <polacek@redhat.com>
* c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index 94447082fb5..1bbb81c8425 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -355,6 +355,10 @@ Wdeprecated
C C++ ObjC ObjC++ Var(warn_deprecated) Init(1) Warning
Warn if a deprecated compiler feature, class, method, or field is used
+Wdiscarded-qualifiers
+C ObjC Var(warn_discarded_qualifiers) Init(1) Warning
+Warn if type qualifiers on pointers are discarded
+
Wdiv-by-zero
C ObjC C++ ObjC++ Var(warn_div_by_zero) Init(1) Warning
Warn about compile-time integer division by zero