This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why C++ tests in C testsuite?


Neil Booth <neil@daikokuya.co.uk> writes:

> Andreas Jaeger wrote:-
>
>> >> All three tests are C++ tests.  Why are they in the C testsuite?  I
>> >> propose to move them to the C++ testsuite.  What do others think?
>> >
>> > They're in the CPP testsuite.  Would you create a subdirectory in cpp/
>> > for C++ tests and move them there?
>> 
>> And how will they get invoked?  I thought of moving them to g++.dg/cpp.
>
> That's probably a better idea.

Here's a patch implementing it.  I've build a compiler on
i686-linux-gnu with C and C++ enabled and run the testsuite and it
executed those new tests.

Ok to commit to mainline?

Andreas

2002-10-06  Andreas Jaeger  <aj@suse.de>

	* testsuite/gcc.dg/cpp/c++98-pedantic.C: Moved to g++.dg/cpp.
	* testsuite/gcc.dg/cpp/c++98.C: Likewise.

	* g++.dg/cpp/c++98-pedantic.C: Moved from gcc.dg/cpp to here.
	* g++.dg/cpp/c++98.C: Likewise.

	* testsuite/g++.dg/README (Subdirectories): Mention cpp directory.

============================================================
Index: gcc/testsuite/g++.dg/README
--- g++.dg/README	7 Aug 2002 00:37:59 -0000	1.3
+++ g++.dg/README	6 Oct 2002 15:56:35 -0000
@@ -1,6 +1,7 @@
 Subdirectories:
 
 abi	 Tests for ABI compatibility -- mangling, object layout, etc.
+cpp	 Tests for the preprocessor.
 eh	 Tests for exception handling.
 expr     Tests for expressions.
 ext	 Tests for GNU language extensions.
============================================================
Index: gcc/testsuite/g++.dg/cpp/c++98.C
--- gcc/testsuite/g++.dg/cpp/c++98.C	created
+++ gcc/testsuite/g++.dg/cpp/c++98.C	Sun Oct  6 17:44:17 2002	1.1
@@ -0,0 +1,10 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.  */
+
+/* { dg-do preprocess } */
+/* { dg-options "-std=c++98" } */
+
+/* This file is for testing the preprocessor in -std=c++98 mode.
+   Neil Booth, 2 Dec 2000.  */
+
+#if 1LL
+#endif
============================================================
Index: gcc/testsuite/g++.dg/cpp/c++98-pedantic.C
--- gcc/testsuite/g++.dg/cpp/c++98-pedantic.C	created
+++ gcc/testsuite/g++.dg/cpp/c++98-pedantic.C	Sun Oct  6 17:44:17 2002	1.1
@@ -0,0 +1,10 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.  */
+
+/* { dg-do preprocess } */
+/* { dg-options "-std=c++98 -pedantic" } */
+
+/* This file is for testing the preprocessor in -std=c++98 -pedantic mode.
+   Neil Booth, 2 Dec 2000.  */
+
+#if 1LL				/* { dg-warning "long long" } */
+#endif
============================================================
Index: gcc/testsuite/gcc.dg/cpp/c++98-pedantic.C
--- gcc/testsuite/gcc.dg/cpp/c++98-pedantic.C	Wed Aug  7 20:32:13 2002	1.1
+++ gcc/testsuite/gcc.dg/cpp/c++98-pedantic.C	removed
@@ -1,10 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.  */
-
-/* { dg-do preprocess } */
-/* { dg-options "-std=c++98 -pedantic" } */
-
-/* This file is for testing the preprocessor in -std=c++98 -pedantic mode.
-   Neil Booth, 2 Dec 2000.  */
-
-#if 1LL				/* { dg-warning "long long" } */
-#endif
============================================================
Index: gcc/testsuite/gcc.dg/cpp/c++98.C
--- gcc/testsuite/gcc.dg/cpp/c++98.C	Wed Aug  7 20:32:13 2002	1.1
+++ gcc/testsuite/gcc.dg/cpp/c++98.C	removed
@@ -1,10 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.  */
-
-/* { dg-do preprocess } */
-/* { dg-options "-std=c++98" } */
-
-/* This file is for testing the preprocessor in -std=c++98 mode.
-   Neil Booth, 2 Dec 2000.  */
-
-#if 1LL
-#endif

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]