This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Move C++ test to C++ testsuite
- From: Mark Mitchell <mark at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 2 Jun 2003 08:27:12 -0700
- Subject: PATCH: Move C++ test to C++ testsuite
- Reply-to: mark at codesourcery dot com
This patch moves gcc.dg/cpp/truefalse.cpp to the C++ testsuite.
(Otherwise, you get failures when configured with C++ disabled.)
Tested on i686-pc-linux-gnu, applied on the mainline.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
2003-06-02 Mark Mitchell <mark@codesourcery.com>
* gcc.dg/cpp/truefalse.cpp: Move it to ...
* g++.dg/cpp/truefalse.C: Here.
* gcc.dg/cpp/cpp.exp: Remove scanning of ".cpp" files.
Index: gcc.dg/cpp/cpp.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/cpp/cpp.exp,v
retrieving revision 1.6
diff -c -5 -p -r1.6 cpp.exp
*** gcc.dg/cpp/cpp.exp 19 Apr 2003 10:04:47 -0000 1.6
--- gcc.dg/cpp/cpp.exp 2 Jun 2003 15:23:58 -0000
***************
*** 1,6 ****
! # Copyright (C) 1997, 2000 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
--- 1,6 ----
! # Copyright (C) 1997, 2000, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
*************** if ![info exists DEFAULT_CFLAGS] then {
*** 34,43 ****
# Initialize `dg'.
dg-init
# Main loop.
! dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{c,cpp,S} ]] \
"" $DEFAULT_CFLAGS
# All done.
dg-finish
--- 34,43 ----
# Initialize `dg'.
dg-init
# Main loop.
! dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{c,S} ]] \
"" $DEFAULT_CFLAGS
# All done.
dg-finish
Index: gcc.dg/cpp/truefalse.cpp
===================================================================
RCS file: gcc.dg/cpp/truefalse.cpp
diff -N gcc.dg/cpp/truefalse.cpp
*** gcc.dg/cpp/truefalse.cpp 19 Apr 2003 10:04:47 -0000 1.1
--- /dev/null 1 Jan 1970 00:00:00 -0000
***************
*** 1,17 ****
- /* Copyright (C) 2003 Free Software Foundation, Inc. */
-
- /* Source: Neil Booth, 18 Apr 2003. */
-
- /* { dg-do preprocess } */
- /* { dg-options "-ansi -pedantic -Wundef" } */
-
- /* Check that for C++ we handle true and false correctly, and do not
- treat them as undefined identifiers. */
-
- #if true /* { dg-bogus "is not defined" } */
- #error foo /* { dg-error "foo" } */
- #endif
-
- #if false /* { dg-bogus "is not defined" } */
- #error foo /* { dg-bogus "foo" } */
- #endif
--- 0 ----
Index: g++.dg/cpp/truefalse.C
===================================================================
RCS file: g++.dg/cpp/truefalse.C
diff -N g++.dg/cpp/truefalse.C
*** /dev/null 1 Jan 1970 00:00:00 -0000
--- g++.dg/cpp/truefalse.C 2 Jun 2003 15:23:58 -0000
***************
*** 0 ****
--- 1,17 ----
+ /* Copyright (C) 2003 Free Software Foundation, Inc. */
+
+ /* Source: Neil Booth, 18 Apr 2003. */
+
+ /* { dg-do preprocess } */
+ /* { dg-options "-ansi -pedantic -Wundef" } */
+
+ /* Check that for C++ we handle true and false correctly, and do not
+ treat them as undefined identifiers. */
+
+ #if true /* { dg-bogus "is not defined" } */
+ #error foo /* { dg-error "foo" } */
+ #endif
+
+ #if false /* { dg-bogus "is not defined" } */
+ #error foo /* { dg-bogus "foo" } */
+ #endif