diff options
author | Martin Uecker <uecker@eecs.berkeley.edu> | 2014-12-19 16:29:16 -0800 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2014-12-20 00:29:16 +0000 |
commit | 768952be25c2fc50bce51a5658377934d49f473f (patch) | |
tree | 0a8c1f437c3f3ba1a17e373c8796d2e79deb28f7 /gcc/c-family/c.opt | |
parent | 189486b85833690ab1ff75c604645ea3d22aa1e1 (diff) | |
download | gcc-768952be25c2fc50bce51a5658377934d49f473f.zip gcc-768952be25c2fc50bce51a5658377934d49f473f.tar.gz gcc-768952be25c2fc50bce51a5658377934d49f473f.tar.bz2 |
invoke.texi: Document -Wdiscarded-array-qualifiers.
2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
* doc/invoke.texi: Document -Wdiscarded-array-qualifiers.
* doc/extend.texi: Document new behavior for pointers to arrays
with qualifiers.
c/
* c-typeck.c: New behavious for pointers to arrays with qualifiers
(common-pointer-type): For pointers to arrays take qualifiers from
element type.
(build_conditional_expr): Add warnings for lost qualifiers.
(comp-target-types): Allow pointers to arrays with different qualifiers.
(convert-for-assignment): Adapt warnings for discarded qualifiers. Add
WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
to PEDWARN_FOR_QUALIFIERS.
c-family/
* c.opt (Wdiscarded-array-qualifiers): New option.
testsuite/
* gcc.dg/Wwrite-strings-1.c: Change dg-warning.
* gcc.dg/array-quals-1.c: Use -Wno-discarded-array-qualifiers.
* gcc.dg/array-quals-2.c: Change dg-options, dg-warning.
* gcc.dg/pointer-array-atomic.c: New test.
* gcc.dg/pointer-array-quals-1.c: New test.
* gcc.dg/pointer-array-quals-2.c: New test (-pedantic-errors).
* gcc.dg/qual-component-1.c: Change dg-options, dg-warnings.
From-SVN: r218985
Diffstat (limited to 'gcc/c-family/c.opt')
-rw-r--r-- | gcc/c-family/c.opt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index 1676f65..f86718b 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -387,6 +387,10 @@ Wdesignated-init C ObjC Var(warn_designated_init) Init(1) Warning Warn about positional initialization of structs requiring designated initializers +Wdiscarded-array-qualifiers +C ObjC Var(warn_discarded_array_qualifiers) Init(1) Warning +Warn if qualifiers on arrays which are pointer targets are discarded + Wdiscarded-qualifiers C ObjC Var(warn_discarded_qualifiers) Init(1) Warning Warn if type qualifiers on pointers are discarded |