From 31b2f52083c2baad93a3ce2e12cf84355c1eabae Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 5 Feb 2022 08:11:07 +0200 Subject: [PATCH] Do not use __PRETTY_FUNCTION__ on GCC 4.x due to codegen bugs --- include/boost/assert/source_location.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/assert/source_location.hpp b/include/boost/assert/source_location.hpp index 1c539bb..dd1cfd7 100644 --- a/include/boost/assert/source_location.hpp +++ b/include/boost/assert/source_location.hpp @@ -148,9 +148,9 @@ template std::basic_ostream & operator<<( std::basic_ost // The built-ins are available in 4.8+, but are not constant expressions until 7 # define BOOST_CURRENT_LOCATION ::boost::source_location(__builtin_FILE(), __builtin_LINE(), __builtin_FUNCTION()) -#elif defined(BOOST_GCC) +#elif defined(BOOST_GCC) && BOOST_GCC >= 50000 -// __PRETTY_FUNCTION__ is allowed outside functions under GCC +// __PRETTY_FUNCTION__ is allowed outside functions under GCC, but 4.x suffers from codegen bugs # define BOOST_CURRENT_LOCATION ::boost::source_location(__FILE__, __LINE__, __PRETTY_FUNCTION__) #else