diff mbox

[committed] Backport r238728 testsuite g++.dg/init/elide5.C fix (PR testsuite/77034)

Message ID 20160816071812.GT14857@tucnak.redhat.com
State New
Headers show

Commit Message

Jakub Jelinek Aug. 16, 2016, 7:18 a.m. UTC
Hi!

I've backported following fix to 6 branch:

2016-08-16  Jakub Jelinek  <jakub@redhat.com>

	PR testsuite/77034
	Backported from mainline
	2016-07-25  Jason Merrill  <jason@redhat.com>

	* g++.dg/init/elide5.C (operator new): Use decltype(sizeof(1)) instead
	of unsigned long.


	Jakub

Comments

Tom de Vries Aug. 28, 2016, 10:04 p.m. UTC | #1
On 16/08/16 09:18, Jakub Jelinek wrote:
> Hi!
>
> I've backported following fix to 6 branch:
>
> 2016-08-16  Jakub Jelinek  <jakub@redhat.com>
>
> 	PR testsuite/77034
> 	Backported from mainline
> 	2016-07-25  Jason Merrill  <jason@redhat.com>
>
> 	* g++.dg/init/elide5.C (operator new): Use decltype(sizeof(1)) instead
> 	of unsigned long.

Hi,

I ran into the same problem with the 5 branch, and backported the fix there.

Thanks,
- Tom
diff mbox

Patch

--- gcc/testsuite/g++.dg/init/elide5.C	(revision 238727)
+++ gcc/testsuite/g++.dg/init/elide5.C	(revision 238728)
@@ -1,7 +1,7 @@ 
 // PR c++/71913
 // { dg-do link { target c++11 } }
 
-void* operator new(unsigned long, void* p) { return p; }
+void* operator new(decltype(sizeof(1)), void* p) { return p; }
 
 struct IndirectReturn {
   IndirectReturn() {}
@@ -24,4 +24,3 @@  int main()
 {
   bar(c);
 }
-