[PPL-devel] [GIT] ppl/ppl(master): Be consistent with the use of attribute weak.

Roberto Bagnara bagnara at cs.unipr.it
Fri Feb 3 10:24:15 CET 2012


Module: ppl/ppl
Branch: master
Commit: 9516ac54f007f2155b89ac0453bdfcd85a4204de
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=9516ac54f007f2155b89ac0453bdfcd85a4204de

Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date:   Fri Feb  3 10:19:01 2012 +0100

Be consistent with the use of attribute weak.

---

 src/assert.hh |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/assert.hh b/src/assert.hh
index 1d6680a..e803a61 100644
--- a/src/assert.hh
+++ b/src/assert.hh
@@ -95,7 +95,12 @@ namespace Parma_Polyhedra_Library {
 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
 //! Helper function causing program termination by calling \c abort.
 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
-void ppl_unreachable() __attribute__((weak, noreturn));
+void ppl_unreachable()
+#if PPL_CXX_SUPPORTS_ATTRIBUTE_WEAK
+  __attribute__((weak, noreturn));
+#else
+  __attribute__((noreturn));
+#endif
 
 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
 /*! \brief
@@ -105,7 +110,12 @@ void ppl_unreachable() __attribute__((weak, noreturn));
 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
 void ppl_unreachable_msg(const char* msg,
                          const char* file, unsigned int line,
-                         const char* function) __attribute__((weak, noreturn));
+                         const char* function)
+#if PPL_CXX_SUPPORTS_ATTRIBUTE_WEAK
+  __attribute__((weak, noreturn));
+#else
+  __attribute__((noreturn));
+#endif
 
 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
 /*! \brief




More information about the PPL-devel mailing list