[MOAB-dev] r4520 - MOAB/trunk/src/moab

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Wed Feb 23 13:46:05 CST 2011


Author: kraftche
Date: 2011-02-23 13:46:04 -0600 (Wed, 23 Feb 2011)
New Revision: 4520

Modified:
   MOAB/trunk/src/moab/Compiler.hpp
Log:
Add MB_DEPRECATED preprocessor directive.  

If placed between a declaration and the final ';', will result in GCC 
emitting a warning for any source code that uses the function or type.
For example:

void somefunction() MB_DEPRECATED;

class someclass {
  public:
    ...
} MB_DEPRECATED;



Modified: MOAB/trunk/src/moab/Compiler.hpp
===================================================================
--- MOAB/trunk/src/moab/Compiler.hpp	2011-02-23 17:15:12 UTC (rev 4519)
+++ MOAB/trunk/src/moab/Compiler.hpp	2011-02-23 19:46:04 UTC (rev 4520)
@@ -96,6 +96,14 @@
   #define MB_DLL_HIDDEN
 #endif
 
+/**\def MB_DEPRECATED
+ *\brief Mark function or API as deprecated
+ */
+#if defined(__GNUC__) && (1000 * __GNUC__ + __GNUC_MINOR__ ) > 3000
+#  define MB_DEPRECATED __attribute__((__deprecated__))
+#else
+#  define MB_DEPRECATED
+#endif
 
 /*@}*/
 


































More information about the moab-dev mailing list