From: Kefu Chai Date: Mon, 22 Oct 2018 08:07:13 +0000 (+0800) Subject: include/ceph_assert: always use __PRETTY_FUNCTION__ for C++ X-Git-Tag: v14.1.0~1119^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5e12cef93008e12d092f4c1de5794304945b55fc;p=ceph.git include/ceph_assert: always use __PRETTY_FUNCTION__ for C++ we've moved to GCC-7, no need to check for ancient compiler versions Signed-off-by: Kefu Chai --- diff --git a/src/include/ceph_assert.h b/src/include/ceph_assert.h index 5fb985503ad9c..a022d2f2936bd 100644 --- a/src/include/ceph_assert.h +++ b/src/include/ceph_assert.h @@ -29,31 +29,11 @@ namespace ceph { struct BackTrace; -/* - * For GNU, test specific version features. Otherwise (e.g. LLVM) we'll use - * the defaults selected below. - */ -#ifdef __GNUC_PREREQ - -/* - * Version 2.4 and later of GCC define a magical variable - * `__PRETTY_FUNCTION__' which contains the name of the function currently - * being defined. This is broken in G++ before version 2.6. C9x has a - * similar variable called __func__, but prefer the GCC one since it demangles - * C++ function names. We define __CEPH_NO_PRETTY_FUNC if we want to avoid - * broken versions of G++. - */ -# if defined __cplusplus ? !__GNUC_PREREQ (2, 6) : !__GNUC_PREREQ (2, 4) -# define __CEPH_NO_PRETTY_FUNC -# endif - -#endif - /* * Select a function-name variable based on compiler tests, and any compiler * specific overrides. */ -#if defined(HAVE_PRETTY_FUNC) && !defined(__CEPH_NO_PRETTY_FUNC) +#if defined(HAVE_PRETTY_FUNC) # define __CEPH_ASSERT_FUNCTION __PRETTY_FUNCTION__ #elif defined(HAVE_FUNC) # define __CEPH_ASSERT_FUNCTION __func__