diff --git a/test/testcpp.py b/test/testcpp.py index 51508c4..dba536e 100644 --- a/test/testcpp.py +++ b/test/testcpp.py @@ -68,4 +68,19 @@ def test_concatenation(self): _qs_""" ) + def test_deadloop_macro(self): + # If there is a word which equals to name of a parametrized macro, then + # attempt to expand such word as a macro manages the parser to fall + # into an infinite loop. + + self.__test_preprocessing("""\ +#define a(x) x + +a;""" + , """\ + + +a;""" + ) + main()