This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++ PATCH for c++/61382 (init-list evaluation order)


	* g++.dg/cpp0x/initlist86.C (main): Initialize i.

diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist86.C b/gcc/testsuite/g++.dg/cpp0x/initlist86.C
index 16af476..ace2ef9 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist86.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist86.C
@@ -11,7 +11,7 @@ extern "C" int printf (const char *, ...);
 
 int main()
 {
-  int i;
+  int i = 0;
   A a{i++,i++};
   if (a.i != 0 || a.j != 1)
     __builtin_abort();
-- 
2.0.0

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]