]> granicus.if.org Git - re2c/commitdiff
Added test fot bug #152 "Line number in #line directive after enum
authorUlya Trofimovich <skvadrik@gmail.com>
Tue, 28 Jun 2016 20:44:58 +0000 (21:44 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Tue, 28 Jun 2016 20:44:58 +0000 (21:44 +0100)
YYCONDTYPE is 0-based".

(thanks to sirzooro for reporting)

re2c/test/bug152.c [new file with mode: 0644]
re2c/test/bug152.re [new file with mode: 0644]

diff --git a/re2c/test/bug152.c b/re2c/test/bug152.c
new file mode 100644 (file)
index 0000000..bee773f
--- /dev/null
@@ -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 (file)
index 0000000..7d235b2
--- /dev/null
@@ -0,0 +1,10 @@
+/*!types:re2c*/
+
+#warning this is line 3
+
+void f()
+{
+/*!re2c
+    <*> * {}
+*/
+}