[NeilB@earthling.net: 2 tests for testsuite]

Zack Weinberg zack@wolery.cumb.org
Mon Jul 17 11:05:00 GMT 2000


I've added these to the test suite.  Their purpose is to ensure that
future patches don't break cpp -dD or -dM, which is easy to do by
accident.  They only test that the preprocessor doesn't crash; testing
for correct output would require considerable Tcl hackery which I am
not up to (patches welcome).

zw


----- Forwarded message from Neil Booth <NeilB@earthling.net> -----

Date: Mon, 17 Jul 2000 05:55:48 +0900
From: Neil Booth <NeilB@earthling.net>
To: Zack Weinberg <zack@wolery.cumb.org>
Subject: 2 tests for testsuite

Zack,

This is it from me.  A couple of tests probably worth adding to the
testsuite.  I haven't bootstrapped so I don't know whether they fail
or not, so I'll leave it to you to apply them.

Neil.

Index: testsuite/gcc.dg/cpp/cmdlne-dD.c
===================================================================
RCS file: cmdlne-dD.c
diff -N cmdlne-dD.c
--- /dev/null	Tue May  5 13:32:27 1998
+++ cmdlne-dD.c	Sun Jul 16 13:55:00 2000
@@ -0,0 +1,12 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.  */
+
+/* { dg-do preprocess } */
+/* { dg-options -dD } */
+
+/* Test -dD does not fail.  */
+
+#define objlike obj like
+#define funlike(like) fun like
+#define funlike2(fun, like) fun ## like
+#define varargs(x, ...) x #x __VA_ARGS__
+#define gnu_varargs(x, y...) x ## y 
Index: testsuite/gcc.dg/cpp/cmdlne-dM.c
===================================================================
RCS file: cmdlne-dM.c
diff -N cmdlne-dM.c
--- /dev/null	Tue May  5 13:32:27 1998
+++ cmdlne-dM.c	Sun Jul 16 13:55:00 2000
@@ -0,0 +1,12 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.  */
+
+/* { dg-do preprocess } */
+/* { dg-options -dM } */
+
+/* Test -dM does not fail.  */
+
+#define objlike obj like
+#define funlike(like) fun like
+#define funlike2(fun, like) fun ## like
+#define varargs(x, ...) x #x #__VA_ARGS__ __VA_ARGS__
+#define gnu_varargs(x, y...) #y x ## y y 

----- End forwarded message -----


More information about the Gcc-patches mailing list