Last active
December 15, 2015 13:49
-
-
Save qnoid/5269777 to your computer and use it in GitHub Desktop.
How to use [diagnostic pragmas][1] to annotate a class/method so as to show a message on compile. [1]: http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html PS. Tested on XCode 4.6.1 http://i.minus.com/iepXiFcByxuKt.png
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define DO_PRAGMA(x) _Pragma (#x) | |
#define MESSAGE(x) DO_PRAGMA(message (x)) | |
@interface TBFoo : NSObject | |
@end | |
@implementation TBFoo | |
-(void)bar MESSAGE("Hello World!"){} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment