[Openmp-commits] [openmp] r238946 - Reorder C++ initialization lists to appease compiler.

Jonathan Peyton jonathan.l.peyton at intel.com
Wed Jun 3 10:26:48 PDT 2015


Author: jlpeyton
Date: Wed Jun  3 12:26:47 2015
New Revision: 238946

URL: http://llvm.org/viewvc/llvm-project?rev=238946&view=rev
Log:
Reorder C++ initialization lists to appease compiler.

in kmp_wait_release.h, there were some constructors where the initialization
lists were out of order with the member declarations inside the class.  This
patch just reorders the initialization list so the compiler doesn't complain.
http://lists.cs.uiuc.edu/pipermail/openmp-dev/2015-June/000670.html

Patch by Jack Howarth and Jonathan Peyton

Modified:
    openmp/trunk/runtime/src/kmp_wait_release.h

Modified: openmp/trunk/runtime/src/kmp_wait_release.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_wait_release.h?rev=238946&r1=238945&r2=238946&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_wait_release.h (original)
+++ openmp/trunk/runtime/src/kmp_wait_release.h Wed Jun  3 12:26:47 2015
@@ -464,18 +464,19 @@ public:
     kmp_flag_oncore(volatile kmp_uint64 *p)
         : kmp_flag<kmp_uint64>(p, flag_oncore), num_waiting_threads(0), flag_switch(false) {}
     kmp_flag_oncore(volatile kmp_uint64 *p, kmp_uint32 idx)
-        : kmp_flag<kmp_uint64>(p, flag_oncore), offset(idx), num_waiting_threads(0), flag_switch(false) {}
+        : kmp_flag<kmp_uint64>(p, flag_oncore), num_waiting_threads(0), offset(idx), flag_switch(false) {}
     kmp_flag_oncore(volatile kmp_uint64 *p, kmp_uint64 c, kmp_uint32 idx, enum barrier_type bar_t,
                     kmp_info_t * thr
 #if USE_ITT_BUILD
                     , void *itt
 #endif
                     ) 
-        : kmp_flag<kmp_uint64>(p, flag_oncore), checker(c), offset(idx), bt(bar_t), this_thr(thr)
+        : kmp_flag<kmp_uint64>(p, flag_oncore), checker(c), num_waiting_threads(0), offset(idx),
+          flag_switch(false), bt(bar_t), this_thr(thr)
 #if USE_ITT_BUILD
         , itt_sync_obj(itt)
 #endif
-        , num_waiting_threads(0), flag_switch(false) {}
+        {}
     kmp_info_t * get_waiter(kmp_uint32 i) { 
         KMP_DEBUG_ASSERT(i<num_waiting_threads);
         return waiting_threads[i]; 





More information about the Openmp-commits mailing list