Skip to content

Instantly share code, notes, and snippets.

@chandlerc
Created August 13, 2012 01:40
Show Gist options
  • Save chandlerc/3336310 to your computer and use it in GitHub Desktop.
Save chandlerc/3336310 to your computer and use it in GitHub Desktop.
#define noinline foobar
#define __clang_internal_attribute_test_macro__noinline 1
#define __clang_internal_attribute_test_macro__foobar 0
#define __my_has_attribute(x) __clang_internal_attribute_test_macro__ ## x
#if __my_has_attribute(noinline)
#error found the feature test macro
#else
#error found something else
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment