8141134: Remove unnecessary pragma warning(disable:4355) from GC code
authortschatzl
Wed, 04 Nov 2015 17:36:29 +0100
changeset 33759 8a0e9139a9c5
parent 33758 aa54610a0b93
child 33760 e2acc6d959f5
8141134: Remove unnecessary pragma warning(disable:4355) from GC code Reviewed-by: ehelin, simonis, stuefe
hotspot/src/share/vm/code/nmethod.cpp
hotspot/src/share/vm/gc/cms/parNewGeneration.cpp
hotspot/src/share/vm/gc/g1/concurrentMark.cpp
hotspot/src/share/vm/gc/g1/dirtyCardQueue.cpp
hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp
hotspot/src/share/vm/gc/g1/satbQueue.cpp
hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp
--- a/hotspot/src/share/vm/code/nmethod.cpp	Wed Nov 04 13:38:38 2015 +0100
+++ b/hotspot/src/share/vm/code/nmethod.cpp	Wed Nov 04 17:36:29 2015 +0100
@@ -680,10 +680,6 @@
   return nm;
 }
 
-#ifdef _MSC_VER
-#pragma warning(push)
-#pragma warning(disable:4355) //  warning C4355: 'this' : used in base member initializer list
-#endif
 // For native wrappers
 nmethod::nmethod(
   Method* method,
@@ -773,10 +769,6 @@
   }
 }
 
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-
 void* nmethod::operator new(size_t size, int nmethod_size, int comp_level) throw () {
   return CodeCache::allocate(nmethod_size, CodeCache::get_code_blob_type(comp_level));
 }
--- a/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp	Wed Nov 04 13:38:38 2015 +0100
+++ b/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp	Wed Nov 04 17:36:29 2015 +0100
@@ -57,10 +57,6 @@
 #include "utilities/globalDefinitions.hpp"
 #include "utilities/stack.inline.hpp"
 
-#ifdef _MSC_VER
-#pragma warning( push )
-#pragma warning( disable:4355 ) // 'this' : used in base member initializer list
-#endif
 ParScanThreadState::ParScanThreadState(Space* to_space_,
                                        ParNewGeneration* young_gen_,
                                        Generation* old_gen_,
@@ -104,9 +100,6 @@
   _old_gen_closure.set_generation(old_gen_);
   _old_gen_root_closure.set_generation(old_gen_);
 }
-#ifdef _MSC_VER
-#pragma warning( pop )
-#endif
 
 void ParScanThreadState::record_survivor_plab(HeapWord* plab_start,
                                               size_t plab_word_size) {
@@ -597,10 +590,6 @@
   par_scan_state.evacuate_followers_closure().do_void();
 }
 
-#ifdef _MSC_VER
-#pragma warning( push )
-#pragma warning( disable:4355 ) // 'this' : used in base member initializer list
-#endif
 ParNewGeneration::ParNewGeneration(ReservedSpace rs, size_t initial_byte_size)
   : DefNewGeneration(rs, initial_byte_size, "PCopy"),
   _overflow_list(NULL),
@@ -643,9 +632,6 @@
                                      ParallelGCThreads, CHECK);
   }
 }
-#ifdef _MSC_VER
-#pragma warning( pop )
-#endif
 
 // ParNewGeneration::
 ParKeepAliveClosure::ParKeepAliveClosure(ParScanWeakRefClosure* cl) :
--- a/hotspot/src/share/vm/gc/g1/concurrentMark.cpp	Wed Nov 04 13:38:38 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/concurrentMark.cpp	Wed Nov 04 17:36:29 2015 +0100
@@ -454,10 +454,6 @@
   return true;
 }
 
-#ifdef _MSC_VER // the use of 'this' below gets a warning, make it go away
-#pragma warning( disable:4355 ) // 'this' : used in base member initializer list
-#endif // _MSC_VER
-
 uint ConcurrentMark::scale_parallel_threads(uint n_par_threads) {
   return MAX2((n_par_threads + 2) / 4, 1U);
 }
--- a/hotspot/src/share/vm/gc/g1/dirtyCardQueue.cpp	Wed Nov 04 13:38:38 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/dirtyCardQueue.cpp	Wed Nov 04 17:36:29 2015 +0100
@@ -64,10 +64,6 @@
   return true;
 }
 
-#ifdef _MSC_VER // the use of 'this' below gets a warning, make it go away
-#pragma warning( disable:4355 ) // 'this' : used in base member initializer list
-#endif // _MSC_VER
-
 DirtyCardQueueSet::DirtyCardQueueSet(bool notify_when_complete) :
   PtrQueueSet(notify_when_complete),
   _mut_process_closure(NULL),
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp	Wed Nov 04 13:38:38 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp	Wed Nov 04 17:36:29 2015 +0100
@@ -1807,11 +1807,6 @@
 
 // Public methods.
 
-#ifdef _MSC_VER // the use of 'this' below gets a warning, make it go away
-#pragma warning( disable:4355 ) // 'this' : used in base member initializer list
-#endif // _MSC_VER
-
-
 G1CollectedHeap::G1CollectedHeap(G1CollectorPolicy* policy_) :
   CollectedHeap(),
   _g1_policy(policy_),
--- a/hotspot/src/share/vm/gc/g1/satbQueue.cpp	Wed Nov 04 13:38:38 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/satbQueue.cpp	Wed Nov 04 17:36:29 2015 +0100
@@ -206,10 +206,6 @@
 }
 #endif // PRODUCT
 
-#ifdef _MSC_VER // the use of 'this' below gets a warning, make it go away
-#pragma warning( disable:4355 ) // 'this' : used in base member initializer list
-#endif // _MSC_VER
-
 SATBMarkQueueSet::SATBMarkQueueSet() :
   PtrQueueSet(),
   _shared_satb_queue(this, true /*perm*/) { }
--- a/hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp	Wed Nov 04 13:38:38 2015 +0100
+++ b/hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp	Wed Nov 04 17:36:29 2015 +0100
@@ -171,9 +171,11 @@
 #define strdup _strdup
 #endif
 
+#if _MSC_VER < 1800
 // Visual Studio 2013 introduced strtoull(); before, one has to use _strtoui64() instead.
-#if _MSC_VER < 1800
 #define strtoull _strtoui64
+// Fixes some wrong warnings about 'this' : used in base member initializer list
+#pragma warning( disable : 4355 )
 #endif