Skip to content

Instantly share code, notes, and snippets.

@kode54
Created January 28, 2014 01:12
Show Gist options
  • Select an option

  • Save kode54/8660691 to your computer and use it in GitHub Desktop.

Select an option

Save kode54/8660691 to your computer and use it in GitHub Desktop.
Preprocessor macro push and pop test for GCC and Clang
#define X 1
#pragma push_macro("X")
#undef X
#define X -1
#pragma pop_macro("X")
int a[X];
int main(void)
{
a[0] = 0;
return a[0];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment