Skip to content

Commit

Permalink
New 'NOTE' macro for (build) research/testing purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
Fish-Git committed Oct 16, 2015
1 parent 9a8f7c5 commit d526fae
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ccfixme.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#define WARN_LINE QLINE "warning : "
#define FIXME_LINE QLINE "FIXME : "
#define TODO_LINE QLINE "TODO : "
#define NOTE_LINE QLINE "NOTE : "

/*-------------------------------------------------------------------*/
/* Macro to suppress compiler "unreferenced variable" warnings */
Expand Down Expand Up @@ -95,4 +96,18 @@
#define WARNING( _msg ) /* (do nothing) */
#endif

/*-------------------------------------------------------------------*/
/* Same idea, but for issuing an informative note during compile */
/*-------------------------------------------------------------------*/

#if defined( _MSVC_ )
#define NOTE( _msg ) __pragma( message( NOTE_LINE _msg ))
#elif defined( __GNUC__ ) && defined( HAVE_GCC_DIAG_PRAGMA )
#define NOTE( _msg ) QPRAGMA( message( _msg ))
#endif

#ifndef NOTE
#define NOTE( _msg ) /* (do nothing) */
#endif

#endif /* _CCFIXME_H_ */

0 comments on commit d526fae

Please sign in to comment.