[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] __PRETTY_FUNCTION__



Hello.

In the MiNTLib, there is a little issue in the file include/assert.h, when using a GCC version > 2. The macro named __PRETTY_FUNCTION__, which contains the name of the current function, exists since GCC 2.4. But because of bad version checking, this macro is not used with GCC > 2.

The attached patch will correct this problem.

Could someone check this in, please ?

Vincent Rivière
diff -aurN mintlib-0.57-CVS/include/assert.h mintlib-0.57-CVS-patch-20071208/include/assert.h
--- mintlib-0.57-CVS/include/assert.h	2007-12-08 13:21:27.375000000 +0100
+++ mintlib-0.57-CVS-patch-20071208/include/assert.h	2007-12-08 14:36:26.046875000 +0100
@@ -98,7 +98,7 @@
    which contains the name of the function currently being defined.
    This is broken in G++ before version 2.6.  */
 # if (!defined __GNUC__ || __GNUC__ < 2 || \
-     __GNUC_MINOR__ < (defined __cplusplus ? 6 : 4))
+     (__GNUC__ == 2 && __GNUC_MINOR__ < (defined __cplusplus ? 6 : 4)))
 #  define __ASSERT_FUNCTION	((const char *) 0)
 # else
 #  define __ASSERT_FUNCTION	__PRETTY_FUNCTION__