https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125955

Drea Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Drea Pinski <pinskia at gcc dot gnu.org> ---
This is expected because at -O0, _GLIBCXX_ASSERTIONS is defined.

You need to use -D_GLIBCXX_NO_ASSERTIONS .


# elif ! defined(__OPTIMIZE__) && ! defined(_GLIBCXX_NO_ASSERTIONS)
// Enable assertions for unoptimized builds.
#  define _GLIBCXX_ASSERTIONS 1
# endif


// Disable std::string explicit instantiation declarations in order to assert.
#ifdef _GLIBCXX_ASSERTIONS
# undef _GLIBCXX_EXTERN_TEMPLATE
# define _GLIBCXX_EXTERN_TEMPLATE -1
#endif

Reply via email to