From dbd70858baa3cba6b62f39674f90447052a851b9 Mon Sep 17 00:00:00 2001 From: Rocco Moretti Date: Wed, 29 Oct 2025 17:50:03 -0500 Subject: [PATCH 1/2] Fixes for compiling with gcc15 --- .../src/core/scoring/lkball/LK_DomeEnergy.cc | 30 ++++++++----------- .../forge/remodel/RemodelGlobalFrame.cc | 2 +- source/src/utility/options/VectorOption_T_.hh | 12 +------- .../ConstantLengthFragments.cxxtest.hh | 6 ++-- source/test/utility/UTools.cxxtest.hh | 4 +-- source/tools/build/basic.settings | 12 ++++++++ 6 files changed, 32 insertions(+), 34 deletions(-) diff --git a/source/src/core/scoring/lkball/LK_DomeEnergy.cc b/source/src/core/scoring/lkball/LK_DomeEnergy.cc index 9ffb2cfb6e1..8f3fcd7d6e5 100644 --- a/source/src/core/scoring/lkball/LK_DomeEnergy.cc +++ b/source/src/core/scoring/lkball/LK_DomeEnergy.cc @@ -1034,15 +1034,13 @@ cubed_root( Real val ) { DerivativeFinderWadj::DerivativeFinderWadj( Vector const & base, Vector const & water, Real w_dist, Real water_adjust ) -: x(14) +: B( base ), + W( water ), + B_to_W( water - base ), + wadj( water_adjust ), + w_dist_( w_dist ), + x(14) { - - w_dist_ = w_dist; - wadj = water_adjust; - - B = base; - W = water; - B_to_W = W - B; B_to_W_norm = B_to_W.norm(); B_to_W_norm2 = B_to_W_norm*B_to_W_norm; B_to_W_norm3 = B_to_W_norm2*B_to_W_norm; @@ -1098,21 +1096,19 @@ DerivativeFinderWadj::dWadj_dWater() { DerivativeFinder::DerivativeFinder( Vector const & base, Vector const & water, Vector const & other, Real min_cose, Real min_sine, Real max_cose, Real max_sine, Real w_dist, Real water_adjust ) : + B(base), + W(water), + Ot(other), + W_to_Ot(Ot - W), + B_to_W(W - B), + w_dist_( w_dist ), + wadj( water_adjust ), x(175) { - w_dist_ = w_dist; - wadj = water_adjust; - - B = base; - W = water; - Ot = other; - - W_to_Ot = Ot - W; W_to_Ot_norm = W_to_Ot.norm(); W_to_Ot_norm2 = W_to_Ot_norm*W_to_Ot_norm; W_to_Ot_norm3 = W_to_Ot_norm*W_to_Ot_norm2; - B_to_W = W - B; B_to_W_norm = B_to_W.norm(); B_to_W_norm2 = B_to_W_norm*B_to_W_norm; B_to_W_norm3 = B_to_W_norm2*B_to_W_norm; diff --git a/source/src/protocols/forge/remodel/RemodelGlobalFrame.cc b/source/src/protocols/forge/remodel/RemodelGlobalFrame.cc index 47a5a49d8fb..cc9a829bd80 100644 --- a/source/src/protocols/forge/remodel/RemodelGlobalFrame.cc +++ b/source/src/protocols/forge/remodel/RemodelGlobalFrame.cc @@ -209,7 +209,7 @@ void RemodelGlobalFrame::get_helical_params( core::pose::Pose & pose ) { Matrix3f I = Matrix3f::Identity(); Matrix3f N = 0.5*(H+H.transpose()) - cos(omega)*I; - Vector3f hN; + Vector3f hN{0.0, 0.0, 0.0}; Real scalar = 0; Real max_scalar = -10000000; for ( core::Size i = 0; i<=2; i++ ) { diff --git a/source/src/utility/options/VectorOption_T_.hh b/source/src/utility/options/VectorOption_T_.hh index 3184882f239..4b73723f8f1 100644 --- a/source/src/utility/options/VectorOption_T_.hh +++ b/source/src/utility/options/VectorOption_T_.hh @@ -106,17 +106,7 @@ protected: // Creation /// @brief Copy constructor - inline - VectorOption_T_( VectorOption_T_ const & option ) : - Super( option ) -#ifdef VECTOROPTION_T_FULL_THREAD_SAFETY - , - mutex_() -#endif - { - (*this) = option; - } - + VectorOption_T_( VectorOption_T_ const & option ) = default; /// @brief Key + description constructor inline diff --git a/source/test/core/fragment/ConstantLengthFragments.cxxtest.hh b/source/test/core/fragment/ConstantLengthFragments.cxxtest.hh index e37dfcc982f..40958f09800 100644 --- a/source/test/core/fragment/ConstantLengthFragments.cxxtest.hh +++ b/source/test/core/fragment/ConstantLengthFragments.cxxtest.hh @@ -267,11 +267,11 @@ void FragmentConstantLengthTest::test_frag_iterator() { FrameList frames; if ( fragset.region( movemap, pos, pos, len, len, frames ) ) { Frame const& frame ( * ( frames[ 1 ] ) ); - Size val; + Size val = 0; TS_ASSERT( silly_cache.retrieve(frame, 1, val) ); //there should be a value ( return true ) TS_ASSERT_EQUALS( val , pos ); - Size val2; + Size val2 = 999555; // Something non-zero TS_ASSERT( it != eit ); TS_ASSERT( silly_cache.retrieve( **it , 1, val2) ); //there should be a value ( return true ) TS_ASSERT_EQUALS( val2 , val ); @@ -285,7 +285,7 @@ void FragmentConstantLengthTest::test_frag_iterator() { ConstFrameIterator it = bfragset.begin(); ConstFrameIterator eit= bfragset.end(); for ( Size pos=1 ; it!=eit; ++it ) { - Size val; + Size val = 0; silly_cache.retrieve( **it, 1, val); TS_ASSERT_EQUALS( val, pos ); ++pos; diff --git a/source/test/utility/UTools.cxxtest.hh b/source/test/utility/UTools.cxxtest.hh index 4b517114694..ad89770ba7e 100644 --- a/source/test/utility/UTools.cxxtest.hh +++ b/source/test/utility/UTools.cxxtest.hh @@ -133,8 +133,8 @@ public: // ------------------------------------------ // /// @brief test isMarkup function void test_isMarkup() { - double num; - unsigned int end_pos; + double num = 0.0; + unsigned int end_pos = 0; bool res; res = test::utools::isMarkup("something(1.23)", 0, num, end_pos, "MARKUP("); diff --git a/source/tools/build/basic.settings b/source/tools/build/basic.settings index 29f1e3d6d01..089403d98c9 100644 --- a/source/tools/build/basic.settings +++ b/source/tools/build/basic.settings @@ -443,6 +443,18 @@ settings = { }, }, + "gcc, |cxx_ver:>=15.0|" : { + "appends" : { + "flags" : { + "warn" : [ + "Wno-error=dangling-pointer=", # Boost spirit issue + ], + }, + }, + }, + + + "gcc, |cxx_ver:>=13.0|" : { "appends" : { "flags" : { From 0407e62cf09e7684389871dbd5233fcd651d1093 Mon Sep 17 00:00:00 2001 From: Rocco Moretti Date: Thu, 30 Oct 2025 15:38:40 -0500 Subject: [PATCH 2/2] Release mode test compilation with GCC 15 --- source/tools/build/basic.settings | 1 + 1 file changed, 1 insertion(+) diff --git a/source/tools/build/basic.settings b/source/tools/build/basic.settings index 089403d98c9..128064bc104 100644 --- a/source/tools/build/basic.settings +++ b/source/tools/build/basic.settings @@ -448,6 +448,7 @@ settings = { "flags" : { "warn" : [ "Wno-error=dangling-pointer=", # Boost spirit issue + "Wno-error=stringop-overflow=", # Internal mis-prediction with small_vector1 ], }, },