aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2010-07-01 10:37:22 -0400
committerJason Merrill <jason@gcc.gnu.org>2010-07-01 10:37:22 -0400
commitcba58ef4861946c8dc001d3f5fe975b9db2f18d4 (patch)
treec2fe4f04062009222ecec5ad19ef25cce98f2a04
parent5a5bd694f7fd5174a9cbbe6e2b034858e225f615 (diff)
downloadgcc-cba58ef4861946c8dc001d3f5fe975b9db2f18d4.zip
gcc-cba58ef4861946c8dc001d3f5fe975b9db2f18d4.tar.gz
gcc-cba58ef4861946c8dc001d3f5fe975b9db2f18d4.tar.bz2
nullptr04.C: Use __INTPTR_TYPE__.
* g++.dg/cpp0x/nullptr04.C: Use __INTPTR_TYPE__. * g++.dg/other/pr25632.C: Likewise. From-SVN: r161673
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr04.C12
-rw-r--r--gcc/testsuite/g++.dg/other/pr25632.C6
3 files changed, 12 insertions, 11 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 2aae7da..9c91245 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-30 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp0x/nullptr04.C: Use __INTPTR_TYPE__.
+ * g++.dg/other/pr25632.C: Likewise.
+
2010-07-01 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/40421
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr04.C b/gcc/testsuite/g++.dg/cpp0x/nullptr04.C
index 6e1d125..be581bc 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr04.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr04.C
@@ -3,17 +3,15 @@
// Test cast to int
-#define unsigned
-__extension__ typedef __SIZE_TYPE__ ssize_t;
-#undef unsigned
+__extension__ typedef __INTPTR_TYPE__ intptr_t;
const int n4 = static_cast<const int>(nullptr); // { dg-error "invalid static_cast " }
const short int n5 = reinterpret_cast<short int>(nullptr); // { dg-error "loses precision" }
-const ssize_t n6 = reinterpret_cast<ssize_t>(nullptr);
-const ssize_t n7 = (ssize_t)nullptr;
+const intptr_t n6 = reinterpret_cast<intptr_t>(nullptr);
+const intptr_t n7 = (intptr_t)nullptr;
decltype(nullptr) mynull = 0;
const int n8 = static_cast<const int>(mynull); // { dg-error "invalid static_cast " }
const short int n9 = reinterpret_cast<short int>(mynull); // { dg-error "loses precision" }
-const ssize_t n10 = reinterpret_cast<ssize_t>(mynull);
-const ssize_t n11 = (ssize_t)mynull;
+const intptr_t n10 = reinterpret_cast<intptr_t>(mynull);
+const intptr_t n11 = (intptr_t)mynull;
diff --git a/gcc/testsuite/g++.dg/other/pr25632.C b/gcc/testsuite/g++.dg/other/pr25632.C
index fe0ad7a..e66ae3b 100644
--- a/gcc/testsuite/g++.dg/other/pr25632.C
+++ b/gcc/testsuite/g++.dg/other/pr25632.C
@@ -2,14 +2,12 @@
/* { dg-do compile } */
-#define unsigned
-__extension__ typedef __SIZE_TYPE__ ssize_t;
-#undef unsigned
+__extension__ typedef __INTPTR_TYPE__ intptr_t;
struct sockaddr_un {
char sun_path[1];
};
-const unsigned SI_SUN_HEAD_LEN = (ssize_t)(((struct sockaddr_un *)0)->sun_path);
+const unsigned SI_SUN_HEAD_LEN = (intptr_t)(((struct sockaddr_un *)0)->sun_path);
int SiGetPeerName ()
{
return SI_SUN_HEAD_LEN;