Bug 2336254 - NearTree fails to build with GCC 15 (-Wtemplate-body)
Summary: NearTree fails to build with GCC 15 (-Wtemplate-body)
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: NearTree
Version: 42
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Dmitrij S. Kryzhevich
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: gcc-15-mass-prebuild
TreeView+ depends on / blocked
 
Reported: 2025-01-07 21:50 UTC by Dave Malcolm
Modified: 2025-02-26 13:21 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.