
C++ Dialect Options (Using the GNU Compiler Collection (GCC))
Mixing code compiled with -frtti with that compiled with -fno-rtti may not work. For example, programs may fail to link if a class compiled with -fno-rtti is used as a base for a class …
When can compiling c++ without RTTI cause problems?
Dec 20, 2010 · One way to avoid this problem is to ensure that all your code and dependencies are compiled with -fno-rtti. Please see the answer by Andy G for a more detailed discussion of …
-qrtti, -qnortti (-fno-rtti) (C++ only) - IBM
Generates runtime type identification (RTTI) information for exception handling and for use by the typeid and dynamic_cast operators. The compiler generates the information needed for the …
Avoiding RTTI, and support for -fno-rtti in Arm Compiler 6
The -fno-rtti option is ignored if -fexceptions is used because C++ exceptions require RTTI. -fexceptions is the default for Arm Compiler 6. Therefore, to completely avoid RTTI, you must …
Type support (basic types, RTTI) - cppreference.com
Apr 9, 2024 · The following behavior-changing defect reports were applied retroactively to previously published C++ standards. This page was last modified on 9 April 2024, at 08:49.
Is there life without RTTI or How we wrote our own dynamic_cast
Oct 13, 2022 · For example, in GCC/Clang we can do it by passing the -fno-rtti flag; In MSVC — via /GR-. Note that disabling RTTI dies not affect the exception mechanism and dynamic …
c++ - clang, std::function and -fno-rtti - Stack Overflow
Dec 23, 2017 · The Clang MSVC driver fails to define _HAS_STATIC_RTTI to 0, which is used by the MSVC standard library to enable no-RTTI code. As a workaround you can manually define …
Clang++ on Windows fails to define std::any when disabling RTTI
Jan 27, 2024 · Disabling RTTI on Clang on Windows prevents std::any from being defined. This does not happen when RTTI is left enabled, or with RTTI disabled on Clang on Linux.
C++ Dialect Options - Using the GNU Compiler Collection (GCC)
The C++ standard allows an implementation to omit creating a temporary which is only used to initialize another object of the same type. Specifying this option disables that optimization, and …
c++ - dynamic_cast with RTTI disabled - Stack Overflow
Oct 7, 2011 · In MSVC, if your code is not compiled with RTTI enabled, a __non_rtti_object exception will be thrown, if the cast cannot be performed without a run-time check. The easiest …