Patchwork [C++,testcase,committed] PR 56530

login
register
mail settings
Submitter Paolo Carlini
Date March 5, 2013, 11:18 a.m.
Message ID <5135D480.8060800@oracle.com>
Download mbox | patch
Permalink /patch/224986/
State New
Headers show

Comments

Paolo Carlini - March 5, 2013, 11:18 a.m.
Hi,

I added the testcase and closed the PR as fixed in 4.7.3 and mainline.

Paolo.

/////////////////
2013-03-05  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/56530
	* g++.dg/warn/Wsign-conversion-2.C: New.

Patch

Index: g++.dg/warn/Wsign-conversion-2.C
===================================================================
--- g++.dg/warn/Wsign-conversion-2.C	(revision 0)
+++ g++.dg/warn/Wsign-conversion-2.C	(working copy)
@@ -0,0 +1,11 @@ 
+// PR c++/56530
+// { dg-options "-Wsign-conversion" }
+
+struct string
+{
+  string () {};
+  ~string () {};
+};
+
+string foo[1];      // okay
+string bar[1][1];   // gives bogus warning