stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Travis Vitek <Travis.Vi...@roguewave.com>
Subject RE: [PATCH] STDCXX-853
Date Mon, 24 Sep 2012 05:18:01 GMT

Liviu,

Should the volatile be to the left of the intT typename here? I know it is equivalent, but
it is weird to look at the line of code below and see that we're following two different conventions.

Travis
_______________________________________
From: Liviu Nicoara
Sent: Sunday, September 23, 2012 8:34 AM
To: dev@stdcxx.apache.org
Subject: [PATCH] STDCXX-853

Umm, I didn't think to search for a corresponding incident and I considered the defect to
be so minor as to not warrant an issue. The following patch has been applied already on 4.2.x:

Index: tests/support/atomic_xchg.cpp
===================================================================
--- tests/support/atomic_xchg.cpp       (revision 1388732)
+++ tests/support/atomic_xchg.cpp       (revision 1388733)
@@ -297,7 +297,7 @@ void run_test (intT, thr_args_base::tag_
      // compute the expected result, "skipping" zeros by incrementing
      // expect twice when it overflows and wraps around to 0 (zero is
      // used as the lock variable in thread_routine() above)
-    intT expect = intT (1);
+    intT volatile expect = intT (1);

      const unsigned long nincr = (Args::nthreads_ * Args::nincr_) / 2U;


Mime
View raw message