This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix a test with bogus size_t type
- From: Marek Polacek <polacek at redhat dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 2 Apr 2015 10:35:35 +0200
- Subject: [PATCH] Fix a test with bogus size_t type
- Authentication-results: sourceware.org; auth=none
We are now more strict when accepting user-defined initializer_lists; in
particular, we now require sizetype, not just any integral type. The
following test failed with -m32, because it had a bogus type of size_t,
with -m32 it usually should be unsigned int, not unsigned long.
Test passes now with both -m32/-m64, ok for trunk?
2015-04-02 Marek Polacek <polacek@redhat.com>
* g++.dg/cpp0x/pr57101.C: Use proper type for size_t.
diff --git gcc/testsuite/g++.dg/cpp0x/pr57101.C gcc/testsuite/g++.dg/cpp0x/pr57101.C
index 94b576f..c0fc966 100644
--- gcc/testsuite/g++.dg/cpp0x/pr57101.C
+++ gcc/testsuite/g++.dg/cpp0x/pr57101.C
@@ -1,7 +1,7 @@
// { dg-do compile { target c++11 } }
// { dg-options "-fcompare-debug" }
-typedef long unsigned size_t;
+typedef __SIZE_TYPE__ size_t;
namespace
{
template < typename _Tp, _Tp __v > struct integral_constant
Marek