Bug 2336254

Summary: NearTree fails to build with GCC 15 (-Wtemplate-body)
Product: [Fedora] Fedora Reporter: Dave Malcolm <dmalcolm>
Component: NearTreeAssignee: Dmitrij S. Kryzhevich <kryzhev>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 42CC: kryzhev, sipoyare
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2333037    

Description Dave Malcolm 2025-01-07 21:50:56 UTC
I'm experimentally rebuilding rawhide with the not-yet-released GCC 15 to see if anything breaks, and to help write the porting guide.  See https://fedoraproject.org/wiki/User:Dmalcolm/gcc-15

My test builds with GCC 15 failed:
https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-15-smoketest-3.failed/build/8476040/

whereas my test builds with GCC 14 succeeded:
https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-15-smoketest-3.failed.checker/build/8477586/

Looking at the failure logs e.g.
https://download.copr.fedorainfracloud.org/results/dmalcolm/gcc-15-smoketest-3.failed/fedora-rawhide-x86_64/08476040-NearTree/builder-live.log.gz

I see:

In file included from ./main.cpp:42:
./TNear.h: In member function 'long int CNearTree<T, DistanceType, distMinValue>::NearTreeNode<TNode, DistanceTypeNode, distMinValueNode>::K_Far(size_t, DistanceTypeNode&, std::vector<triple<DistanceTypeNode, T, long unsigned int> >&, const TNode&)':
./TNear.h:8731:113: error: 'class CNearTree<T, DistanceType, distMinValue>::NearTreeNode<TNode, DistanceTypeNode, distMinValueNode>' has no member named 'm_pt_Right'; did you mean 'm_ptRight'? [-Wtemplate-body]
 8731 |                         tFarthest.insert( tFarthest.end(), make_triple( -dDR, m_ObjectStore[pt->m_ptRight], pt->m_pt_Right ) );
      |                                                                                                                 ^~~~~~~~~~
      |                                                                                                                 m_ptRight

See https://fedoraproject.org/wiki/User:Dmalcolm/gcc-15#C++:_error_with_-Wtemplate-body

Reproducible: Always

Comment 1 Aoife Moloney 2025-02-26 13:21:35 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.