Re: Addition of compiler flag for dynamic_cast optimization

2025-07-15 Thread Thomas de Bock via Gcc
Subject: [ext] Re: Addition of compiler flag for dynamic_cast optimization On Mon, Jul 14 2025, Jonathan Wakely via Gcc wrote: > On Mon, 14 Jul 2025 at 14:57, Thomas de Bock via Gcc wrote: >> >> Hello all, I've been looking into a compiler optimization implemented by >&

Re: Addition of compiler flag for dynamic_cast optimization

2025-07-15 Thread Martin Jambor
On Mon, Jul 14 2025, Jonathan Wakely via Gcc wrote: > On Mon, 14 Jul 2025 at 14:57, Thomas de Bock via Gcc wrote: >> >> Hello all, I've been looking into a compiler optimization implemented by >> clang but not gcc that substitutes a __dynamic_cast call for a simple vtable >> ptr comparison in th

Re: Addition of compiler flag for dynamic_cast optimization

2025-07-14 Thread Thomas de Bock via Gcc
4 To: Thomas de Bock Cc: gcc@gcc.gnu.org Subject: [ext] Re: Addition of compiler flag for dynamic_cast optimization On Mon, 14 Jul 2025 at 14:57, Thomas de Bock via Gcc wrote: > > Hello all, I've been looking into a compiler optimization implemented by > clang but not gcc that substi

Re: Addition of compiler flag for dynamic_cast optimization

2025-07-14 Thread Jonathan Wakely via Gcc
On Mon, 14 Jul 2025 at 14:57, Thomas de Bock via Gcc wrote: > > Hello all, I've been looking into a compiler optimization implemented by > clang but not gcc that substitutes a __dynamic_cast call for a simple vtable > ptr comparison in the case that the class being cast to is final. > > However

Addition of compiler flag for dynamic_cast optimization

2025-07-14 Thread Thomas de Bock via Gcc
Hello all, I've been looking into a compiler optimization implemented by clang but not gcc that substitutes a __dynamic_cast call for a simple vtable ptr comparison in the case that the class being cast to is final. However this brings issues with it in some cases (specified in thread). I belie