public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Marek Polacek <polacek@redhat.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: [PATCH] Fix a test with bogus size_t type
Date: Thu, 02 Apr 2015 08:35:00 -0000	[thread overview]
Message-ID: <20150402083534.GT25731@redhat.com> (raw)

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

             reply	other threads:[~2015-04-02  8:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-02  8:35 Marek Polacek [this message]
2015-04-03 14:53 ` Jakub Jelinek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150402083534.GT25731@redhat.com \
    --to=polacek@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).