Fixed the bug that redefined macros could co-exist but not all be undefined with a single #undef.
This commit is contained in:
25
test/val/bug1822-pptest.c
Normal file
25
test/val/bug1822-pptest.c
Normal file
@@ -0,0 +1,25 @@
|
||||
/* Bug #1822 - Redefined macros failed to be all undefined with a single #undef */
|
||||
|
||||
#undef F
|
||||
#undef F
|
||||
|
||||
#define F 1
|
||||
#define F 1
|
||||
|
||||
#undef F
|
||||
#if defined F
|
||||
#error #undef F fails!
|
||||
#endif
|
||||
|
||||
#define F 0
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
if (F != 0)
|
||||
{
|
||||
printf("failed: F = %d\n", F);
|
||||
}
|
||||
return F;
|
||||
}
|
||||
Reference in New Issue
Block a user