From 4f153f7717bfd8d23852b17f1f92b4f853a5c7be Mon Sep 17 00:00:00 2001 From: Ulya Trofimovich Date: Tue, 28 Jun 2016 21:44:58 +0100 Subject: [PATCH] Added test fot bug #152 "Line number in #line directive after enum YYCONDTYPE is 0-based". (thanks to sirzooro for reporting) --- re2c/test/bug152.c | 15 +++++++++++++++ re2c/test/bug152.re | 10 ++++++++++ 2 files changed, 25 insertions(+) create mode 100644 re2c/test/bug152.c create mode 100644 re2c/test/bug152.re diff --git a/re2c/test/bug152.c b/re2c/test/bug152.c new file mode 100644 index 00000000..bee773f7 --- /dev/null +++ b/re2c/test/bug152.c @@ -0,0 +1,15 @@ +/* Generated by re2c */ +#line 1 "bug152.re" +#line 4 "bug152.c" +enum YYCONDTYPE { +}; +#line 1 "bug152.re" + + +#warning this is line 3 + +void f() +{ +#line 9 "bug152.re" + +} diff --git a/re2c/test/bug152.re b/re2c/test/bug152.re new file mode 100644 index 00000000..7d235b2f --- /dev/null +++ b/re2c/test/bug152.re @@ -0,0 +1,10 @@ +/*!types:re2c*/ + +#warning this is line 3 + +void f() +{ +/*!re2c + <*> * {} +*/ +} -- 2.40.0