OSDN Git Service

New test case for the preprocessor.
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 19 Jan 1999 12:10:15 +0000 (12:10 +0000)
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 19 Jan 1999 12:10:15 +0000 (12:10 +0000)
I made it up myself; the inspiration came from a comp.std.c post. -zack

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24767 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/gcc.c-torture/execute/990119-1.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.c-torture/execute/990119-1.c b/gcc/testsuite/gcc.c-torture/execute/990119-1.c
new file mode 100644 (file)
index 0000000..80981cc
--- /dev/null
@@ -0,0 +1,13 @@
+/* This checks for two things:
+   - an obscure corner case in the standard rules for __LINE__
+   - regression of an associated bug in cpplib where the semicolon got lost */
+int i = __LINE__\
+;
+
+int main (void)
+{
+  if (i != 4)
+    abort();
+  else
+    return 0;
+}