diff options
author | Marek Polacek <polacek@redhat.com> | 2014-07-01 08:53:12 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2014-07-01 08:53:12 +0000 |
commit | 52ec0ea334753fbe7a81c15c17636fb22a3c7d2d (patch) | |
tree | 98e47da6bde5358750ba0aac6b53b099e2e8eee6 /gcc/c-family | |
parent | d5c3d343bdc26d8d16d2a3b20c25dce3c619ff69 (diff) | |
download | gcc-52ec0ea334753fbe7a81c15c17636fb22a3c7d2d.zip gcc-52ec0ea334753fbe7a81c15c17636fb22a3c7d2d.tar.gz gcc-52ec0ea334753fbe7a81c15c17636fb22a3c7d2d.tar.bz2 |
invoke.texi: Document -Wint-conversion.
* doc/invoke.texi: Document -Wint-conversion.
c-family/
* c.opt (Wint-conversion): New option.
c/
* c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
instead of 0 to WARN_FOR_ASSIGNMENT.
testsuite/
* gcc.dg/Wint-conversion.c: New test.
From-SVN: r212193
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/c-family/c.opt | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index e8d2942..25acae8 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,5 +1,9 @@ 2014-07-01 Marek Polacek <polacek@redhat.com> + * c.opt (Wint-conversion): New option. + +2014-07-01 Marek Polacek <polacek@redhat.com> + PR c/58286 * c.opt (Wincompatible-pointer-types): New option. diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index 6448b1b..c89040a 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -474,6 +474,10 @@ Winherited-variadic-ctor C++ ObjC++ Var(warn_inh_var_ctor) Init(1) Warning Warn about C++11 inheriting constructors when the base has a variadic constructor +Wint-conversion +C ObjC Var(warn_int_conversion) Init(1) Warning +Warn about incompatible integer to pointer and pointer to integer conversions + Wint-to-pointer-cast C ObjC C++ ObjC++ Var(warn_int_to_pointer_cast) Init(1) Warning Warn when there is a cast to a pointer from an integer of a different size |