add push_macro test again
This commit is contained in:
2
tccpp.c
2
tccpp.c
@ -1741,7 +1741,7 @@ pack_error:
|
||||
if(def->off >= def->size){
|
||||
int size = def->size;
|
||||
size *= 2;
|
||||
if (size >= MACRO_STACK_SIZE)
|
||||
if (size > MACRO_STACK_SIZE)
|
||||
tcc_error("stack full");
|
||||
def->data = tcc_realloc(def->data, size*sizeof(Sym*));
|
||||
def->size = size;
|
||||
|
||||
@ -382,16 +382,29 @@ comment
|
||||
/* macro_push and macro_pop test */
|
||||
#define MACRO_TEST "macro_test1\n"
|
||||
#pragma push_macro("MACRO_TEST")
|
||||
printf(MACRO_TEST);
|
||||
#undef MACRO_TEST
|
||||
|
||||
#define MACRO_TEST "macro_test2\n"
|
||||
#pragma push_macro("MACRO_TEST")
|
||||
printf(MACRO_TEST);
|
||||
#undef MACRO_TEST
|
||||
|
||||
#define MACRO_TEST "macro_test3\n"
|
||||
#pragma push_macro("MACRO_TEST")
|
||||
printf(MACRO_TEST);
|
||||
#undef MACRO_TEST
|
||||
|
||||
#define MACRO_TEST "macro_test4\n"
|
||||
printf(MACRO_TEST);
|
||||
#undef MACRO_TEST
|
||||
|
||||
#pragma pop_macro("MACRO_TEST")
|
||||
printf(MACRO_TEST);
|
||||
|
||||
#pragma pop_macro("MACRO_TEST")
|
||||
printf(MACRO_TEST);
|
||||
|
||||
#pragma pop_macro("MACRO_TEST")
|
||||
printf(MACRO_TEST);
|
||||
/* gcc does not support
|
||||
|
||||
Reference in New Issue
Block a user