tinycc/tests/tests2/77_push_pop_macro.c
seyko 0c8447db79 * and #pragma pop_macro("macro_name")
* give warning if pragma is unknown for tcc
    * don't free asm_label in sym_free(),
      it's a job of the asm_free_labels().

    The above pragmas are used in the mingw headers.
    Thise pragmas are implemented in gcc-4.5+ and current
    clang.
2015-04-21 06:34:35 +03:00

24 lines
446 B
C

#include <stdio.h>
int main()
{
#define abort "111"
printf("abort = %s\n", abort);
#pragma push_macro("abort")
#undef abort
#define abort "222"
printf("abort = %s\n", abort);
#pragma push_macro("abort")
#undef abort
#define abort "333"
printf("abort = %s\n", abort);
#pragma pop_macro("abort")
printf("abort = %s\n", abort);
#pragma pop_macro("abort")
printf("abort = %s\n", abort);
}