diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-20 01:10:00 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-20 01:10:00 +0000 |
commit | 0766e8763c0c87e7190f60f6e754b76614ccc326 (patch) | |
tree | 14947a42d28eff84a4539188551c43e15026cc3f /gcc/c.opt | |
parent | caac37c241c47fe1c95a28c8824bf863cc947260 (diff) | |
download | linaro-gcc-0766e8763c0c87e7190f60f6e754b76614ccc326.tar.gz linaro-gcc-0766e8763c0c87e7190f60f6e754b76614ccc326.tar.bz2 linaro-gcc-0766e8763c0c87e7190f60f6e754b76614ccc326.zip |
2005-04-20 Michael Pogue <michael.pogue@sun.com>
Joseph S. Myers <joseph@codesourcery.com>
* c.opt (Wint-to-pointer-cast, Wpointer-to-int-cast): New options.
* c-typeck.c (build_c_cast): Check these options.
* doc/invoke.texi: Document these options.
testsuite:
* gcc.dg/Wint-to-pointer-cast-1.c,
gcc.dg/Wint-to-pointer-cast-2.c, gcc.dg/Wint-to-pointer-cast-3.c,
gcc.dg/Wpointer-to-int-cast-1.c, gcc.dg/Wpointer-to-int-cast-2.c,
gcc.dg/Wpointer-to-int-cast-3.c: New tests.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98429 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c.opt')
-rw-r--r-- | gcc/c.opt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/c.opt b/gcc/c.opt index 2f643b31980..ee456fc45cc 100644 --- a/gcc/c.opt +++ b/gcc/c.opt @@ -226,6 +226,10 @@ Wimport C ObjC C++ ObjC++ Deprecated. This switch has no effect. +Wint-to-pointer-cast +C ObjC Var(warn_int_to_pointer_cast) Init(1) +Warn when there is a cast to a pointer from an integer of a different size + Winvalid-offsetof C++ ObjC++ Var(warn_invalid_offsetof) Init(1) Warn about invalid uses of the \"offsetof\" macro @@ -314,6 +318,10 @@ Wpointer-arith C ObjC C++ ObjC++ Var(warn_pointer_arith) Warn about function pointer arithmetic +Wpointer-to-int-cast +C ObjC Var(warn_pointer_to_int_cast) Init(1) +Warn when a pointer is cast to an integer of a different size + Wprotocol ObjC ObjC++ Var(warn_protocol) Init(1) Warn if inherited methods are unimplemented |