public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix a test with bogus size_t type
@ 2015-04-02  8:35 Marek Polacek
  2015-04-03 14:53 ` Jakub Jelinek
  0 siblings, 1 reply; 2+ messages in thread
From: Marek Polacek @ 2015-04-02  8:35 UTC (permalink / raw)
  To: GCC Patches

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix a test with bogus size_t type
  2015-04-02  8:35 [PATCH] Fix a test with bogus size_t type Marek Polacek
@ 2015-04-03 14:53 ` Jakub Jelinek
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Jelinek @ 2015-04-03 14:53 UTC (permalink / raw)
  To: Marek Polacek; +Cc: GCC Patches

On Thu, Apr 02, 2015 at 10:35:35AM +0200, Marek Polacek wrote:
> 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?

That is obvious.

> 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

	Jakub

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-03 14:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-02  8:35 [PATCH] Fix a test with bogus size_t type Marek Polacek
2015-04-03 14:53 ` Jakub Jelinek

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).