aboutsummaryrefslogtreecommitdiff
path: root/gcc/c.opt
diff options
context:
space:
mode:
authorJoseph Myers <jsm28@gcc.gnu.org>2005-04-20 02:10:00 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2005-04-20 02:10:00 +0100
commit53a2494eea417253a25732b427963ac080923edd (patch)
tree14947a42d28eff84a4539188551c43e15026cc3f /gcc/c.opt
parent7195b4148a916bab2451894b84e1298b5c42b8fe (diff)
downloadgcc-53a2494eea417253a25732b427963ac080923edd.zip
gcc-53a2494eea417253a25732b427963ac080923edd.tar.gz
gcc-53a2494eea417253a25732b427963ac080923edd.tar.bz2
c.opt (Wint-to-pointer-cast, [...]): New options.
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. From-SVN: r98429
Diffstat (limited to 'gcc/c.opt')
-rw-r--r--gcc/c.opt8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/c.opt b/gcc/c.opt
index 2f643b3..ee456fc 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