OSDN Git Service

2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
authormanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Apr 2010 07:49:41 +0000 (07:49 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 05:30:40 +0000 (14:30 +0900)
PR c++/28584
* c.opt (Wint-to-pointer-cast): Available in C++.
* doc/invoke.texi (Wint-to-pointer-cast): Available in C++.
cp/
* typeck.c (cp_build_c_cast): Warn for casting integer to larger
pointer type.
testsuite/
* gcc.dg/Wint-to-pointer-cast-1.c: Move to...
* c-c++-common/Wint-to-pointer-cast-1.c: ...  here.
* gcc.dg/Wint-to-pointer-cast-2.c: Move to...
* c-c++-common/Wint-to-pointer-cast-2.c: ...  here.
* gcc.dg/Wint-to-pointer-cast-3.c: Move to...
* c-c++-common/Wint-to-pointer-cast-3.c: ...  here. Update.
* g++.old-deja/g++.mike/warn1.C: Add -Wno-int-to-pointer-cast.
* g++.dg/other/increment1.C: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158150 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/cp/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wint-to-pointer-cast-2.c [deleted file]
gcc/testsuite/gcc.dg/Wpointer-to-int-cast-1.c [deleted file]

index 565f832..57f9f2a 100644 (file)
@@ -1,3 +1,9 @@
+2010-04-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
+
+       PR c++/28584
+       * c.opt (Wint-to-pointer-cast): Available in C++.
+       * doc/invoke.texi (Wint-to-pointer-cast): Available in C++.
+
 2010-04-08  Eric Botcazou  <ebotcazou@adacore.com>
 
        * tree.h (TREE_ADDRESSABLE): Document its effect for function types.
index 488ca29..4a1a49a 100644 (file)
@@ -1,3 +1,9 @@
+2010-04-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
+
+       PR c++/28584
+       * typeck.c (cp_build_c_cast): Warn for casting integer to larger
+       pointer type.
+
 2010-04-07  Jason Merrill  <jason@redhat.com>
 
        PR c++/43016
index f3c6087..479c84a 100644 (file)
@@ -1,3 +1,15 @@
+2010-04-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
+
+       PR c++/28584
+       * gcc.dg/Wint-to-pointer-cast-1.c: Move to...
+       * c-c++-common/Wint-to-pointer-cast-1.c: ...  here.
+       * gcc.dg/Wint-to-pointer-cast-2.c: Move to...   
+       * c-c++-common/Wint-to-pointer-cast-2.c: ...  here.
+       * gcc.dg/Wint-to-pointer-cast-3.c: Move to...   
+       * c-c++-common/Wint-to-pointer-cast-3.c: ...  here. Update.
+       * g++.old-deja/g++.mike/warn1.C: Add -Wno-int-to-pointer-cast.
+       * g++.dg/other/increment1.C: Likewise.
+
 2010-04-09  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/18918
diff --git a/gcc/testsuite/c-c++-common/Wint-to-pointer-cast-2.c b/gcc/testsuite/c-c++-common/Wint-to-pointer-cast-2.c
deleted file mode 100644 (file)
index 5546abb..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/* Test -Wint-to-pointer-cast.  */
-/* Origin: Joseph Myers <joseph@codesourcery.com> */
-/* { dg-do compile } */
-/* { dg-options "-Wint-to-pointer-cast" } */
-
-char c;
-
-void *
-f (void)
-{
-  return (void *) c; /* { dg-warning "cast to pointer from integer of different size" } */
-}
diff --git a/gcc/testsuite/gcc.dg/Wpointer-to-int-cast-1.c b/gcc/testsuite/gcc.dg/Wpointer-to-int-cast-1.c
deleted file mode 100644 (file)
index ff011c7..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/* Test -Wpointer-to-int-cast - on by default.  */
-/* Origin: Joseph Myers <joseph@codesourcery.com> */
-/* { dg-do compile } */
-/* { dg-options "" } */
-
-void *p;
-
-char
-f (void)
-{
-  return (char) p; /* { dg-warning "cast from pointer to integer of different size" } */
-}