aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cpp/trad
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp/trad')
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/Wunused.c37
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/Wunused.h1
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/__STDC__.c7
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/argcount.c21
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/assembler.S25
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/assert1.c46
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/assert2.c23
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/assert3.c10
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/builtins.c52
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/builtins.h1
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/cmdlne-C.c37
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/cmdlne-C2.c15
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/cmdlne-dD.c9
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/cmdlne-dM.c9
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/comment-2.c11
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/comment.c5
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/define.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/defined.c78
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/directive.c20
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/escaped-eof.c6
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/escaped-nl.c10
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/funlike-2.c23
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/funlike-3.c12
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/funlike-4.c26
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/funlike.c25
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/hash.c14
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/include.c9
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/literals-1.c28
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/literals-2.c8
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/maccom1.c17
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/maccom2.c18
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/maccom3.c17
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/maccom4.c19
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/maccom6.c24
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/macroargs.c30
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/mi1.c36
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/mi1c.h12
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/mi1nd.h8
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/mi1ndp.h7
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/mi1x.h9
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/mi2.c12
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/mi2a.h5
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/mi2b.h6
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/mi2c.h15
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/mi3.c20
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/mi3.def10
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/mi3.h7
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/mi4.c10
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/mi5.c13
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/mi6.c59
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/mi6a.h5
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/mi6b.h5
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/mi6c.h5
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/mi6d.h5
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/mi6e.h5
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/mi7.c19
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/mi7a.h4
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/mi7b.h4
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/null-drctv.c6
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/num-sign.c16
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/paste.c16
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/quote.c6
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/recurse-1.c10
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/recurse-2.c16
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/recurse-3.c25
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/redef1.c36
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/redef2.c32
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/strify.c17
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/trad.exp43
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/uchar.c8
70 files changed, 0 insertions, 1207 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/Wunused.c b/gcc/testsuite/gcc.dg/cpp/trad/Wunused.c
deleted file mode 100644
index 403d617f5d0..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/Wunused.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc. */
-
-/* { dg-do preprocess } */
-/* { dg-options "-Wunused-macros -traditional-cpp" } */
-
-/* Test everything related to -Wunused-macros.
-
- Source: Neil Booth, 23 Jul 2002. */
-
-#include "Wunused.h"
-
-#define used1 /* { dg-bogus "used" } */
-#define used2 /* { dg-bogus "used" } */
-#define used3 /* { dg-bogus "used" } */
-#define used4 something /* { dg-bogus "used" } */
-
-#define unused5 /* { dg-warning "used" } */
-#define unused6 /* { dg-warning "used" } */
-#define unused7() /* { dg-warning "used" } */
-
-#if defined used1
-#endif
-#ifdef used2
-#endif
-#ifndef used3
-#endif
-used4
-
-unused7; /* This does not count as a use. */
-
-#if 0
-unused5 /* This does not count as a use. */
-#endif
-
-#undef unused5
-#define unused6
-unused6
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/Wunused.h b/gcc/testsuite/gcc.dg/cpp/trad/Wunused.h
deleted file mode 100644
index 8b54412bdd4..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/Wunused.h
+++ /dev/null
@@ -1 +0,0 @@
-#define unused_but_ok
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/__STDC__.c b/gcc/testsuite/gcc.dg/cpp/trad/__STDC__.c
deleted file mode 100644
index b25bcb9aa76..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/__STDC__.c
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Test that __STDC__ is not defined. */
-
-/* { dg-do preprocess } */
-
-#if defined __STDC__
-# error __STDC__ defined /* { dg-bogus "__STDC__" "__STDC__ defined" } */
-#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/argcount.c b/gcc/testsuite/gcc.dg/cpp/trad/argcount.c
deleted file mode 100644
index 208cd44b3b0..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/argcount.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Test that we correctly complain about an invalid number of macro
- arguments. */
-
-/* { dg-do preprocess } */
-
-#define f(x) x
-#define g(x, y) x y
-#define h()
-
-f(); /* { dg-bogus "requires 1" "no arg is 1 empty arg" } */
-f( ); /* { dg-bogus "macro" "1 arg to 1 param macro" } */
-f(1,); /* { dg-error "passed 2" "2 args to 1 param macro" } */
-f(1,2); /* { dg-error "passed 2" "2 args to 1 param macro" } */
-h(); /* { dg-bogus "macro" "no arg to 1 param macro" } */
-h( ); /* { dg-error "passed 1" "1 arg to 0 param macro" } */
-h(1,2); /* { dg-error "passed 2" "2 args to 0 param macro" } */
-g(); /* { dg-error "requires 2" "0 args to 2 param macro" } */
-g( ); /* { dg-error "requires 2" "1 args to 2 param macro" } */
-g( ,2); /* { dg-bogus "requires 2" "2 args to 2 param macro" } */
-g(,); /* { dg-bogus "requires 2" "2 args to 2 param macro" } */
-g(1,2,3); /* { dg-error "passed 3" "3 args to 2 param macro" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/assembler.S b/gcc/testsuite/gcc.dg/cpp/trad/assembler.S
deleted file mode 100644
index 729162a5120..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/assembler.S
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Regression test - in assembly language, # may have some significance
- other than 'stringize macro argument' and therefore must be preserved
- in the output, and should not be warned about. */
-
-/* { dg-do preprocess } */
-
-#define foo() mov r0, #5 /* { dg-bogus "not followed" "spurious warning" } */
-
-entry:
- foo()
-
-/* Check we don't EOF on an unknown directive. */
-#unknown directive
-#error a later diagnostic /* { dg-error "diagnostic" } */
-
-/*
- { dg-final { if ![file exists 20000510-1.i] { return } } }
- { dg-final { set tmp [grep 20000510-1.i # line] } }
- { dg-final { if {[string length $tmp] > 0} \{ } }
- { dg-final { pass "20000510-1.S: # preservation" } }
- { dg-final { \} else \{ } }
- { dg-final { fail "20000510-1.S: # preservation" } }
- { dg-final { \} } }
-*/
-
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/assert1.c b/gcc/testsuite/gcc.dg/cpp/trad/assert1.c
deleted file mode 100644
index ff7cc620bec..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/assert1.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Basic tests of the #assert preprocessor extension. */
-/* { dg-do compile } */
-/* { dg-options "" } */
-
-#define def unused expansion
-#define fail int fail
-
-#assert abc (def)
-#assert abc (ghi)
-#assert abc (jkl)
-#assert space ( s p a c e )
-
-/* Basic: */
-#if !#abc (def) || !#abc (ghi) || !#abc (jkl)
-fail
-#endif
-
-/* any answer for #abc */
-#if !#abc
-fail
-#endif
-
-/* internal whitespace is collapsed,
- external whitespace is deleted */
-#if !#space (s p a c e) || !#space ( s p a c e ) || #space (space)
-fail
-#endif
-
-/* removing assertions */
-#unassert abc (jkl)
-#if !#abc || !#abc (def) || !#abc (ghi) || #abc (jkl)
-fail
-#endif
-
-#unassert abc
-#if #abc || #abc (def) || #abc (ghi) || #abc (jkl)
-fail
-#endif
-
-int gobble
-
-/* make sure it can succeed too.
- also check space before open paren isn't significant */
-#if #space(s p a c e)
-;
-#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/assert2.c b/gcc/testsuite/gcc.dg/cpp/trad/assert2.c
deleted file mode 100644
index 9838e149cbf..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/assert2.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Malformed assertion tests. */
-/* { dg-do preprocess } */
-
-#assert /* { dg-error "without predicate" "assert w/o predicate" } */
-#assert % /* { dg-error "an identifier" "assert punctuation" } */
-#assert 12 /* { dg-error "an identifier" "assert number" } */
-#assert abc /* { dg-error "missing" "assert w/o answer" } */
-
-#if # /* { dg-error "without predicate" "test w/o predicate" } */
-#endif
-
-#if #% /* { dg-error "an identifier" "test punctuation" } */
-#endif
-
-#if #12 /* { dg-error "an identifier" "test number" } */
-#endif
-
-#if #abc
-#error /* { dg-bogus "error" "test w/o answer" } */
-#endif
-
-#if #abc[def] /* { dg-error "not valid in" "bad syntax" } */
-#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/assert3.c b/gcc/testsuite/gcc.dg/cpp/trad/assert3.c
deleted file mode 100644
index df9b19fdaf9..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/assert3.c
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc. */
-
-/* { dg-do preprocess } */
-/* { dg-options "-A abc=def -A abc\(ghi\) \"-Aabc = jkl\" -A abc=mno -A -abc=mno" } */
-
-/* Test -A command line syntax. Source Neil Booth. 31 Oct 2000. */
-
-#if !#abc (def) || !#abc (ghi) || !#abc (jkl) || #abc(mno)
-#error Command line -A assertions
-#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/builtins.c b/gcc/testsuite/gcc.dg/cpp/trad/builtins.c
deleted file mode 100644
index df2718983a1..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/builtins.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Test that builtin-macros are OK. */
-
-/* { dg-do run } */
-
-#include "builtins.h"
-
-void abort (void);
-char *strstr (const char *, const char *);
-int strcmp (const char *, const char *);
-
-#define LINE __LINE__
-
-#if __LINE__ != 13
-# error __LINE__ part 1 /* { dg-bogus "__LINE__" } */
-#endif
-
-#if \
- __LINE__ != 18
-# error __LINE__ part 2 /* { dg-bogus "__LINE__" } */
-#endif
-
-#if LINE != 22
-# error __LINE__ part 3 /* { dg-bogus "__LINE__" } */
-#endif
-
-#if __INCLUDE_LEVEL != 0
-# error __INCLUDE_LEVEL__ /* { dg-bogus "__INCLUDE_LEVEL__" } */
-#endif
-
-#if !defined (__TIME__)
-# error __TIME__ /* { dg-bogus "__TIME__" } */
-#endif
-
-#if !defined (__DATE__)
-# error __DATE__ /* { dg-bogus "__DATE__" } */
-#endif
-
-
-int main ()
-{
- /* level is defined in builtins.h. */
- if (level != 1)
- abort ();
-
- if (!strstr (__FILE__, "builtins.c"))
- abort ();
-
- if (!strcmp (__BASE_FILE__, "builtins.c"))
- abort ();
-
- return 0;
-}
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/builtins.h b/gcc/testsuite/gcc.dg/cpp/trad/builtins.h
deleted file mode 100644
index 9f2b9a01402..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/builtins.h
+++ /dev/null
@@ -1 +0,0 @@
-int level = __INCLUDE_LEVEL__;
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/cmdlne-C.c b/gcc/testsuite/gcc.dg/cpp/trad/cmdlne-C.c
deleted file mode 100644
index ff67ddbdb7b..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/cmdlne-C.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc. */
-
-/* { dg-do preprocess } */
-/* { dg-options "-C -traditional-cpp" } */
-
-/* Test -C doesn't fail with #define. #define is the tricky case,
- being the only directive that remembers its comments.
-
- -C treats comments as tokens in their own right, so e.g. comment at
- the beginning of a directive turns it into a non-directive. */
-
-#define simple no comments
-
-#define/**/obj_like/**/(some)/**/thing/**/
-#define fun_like(/**/x/**/,/**/y/**/)/**/
-/**/#define not_a_macro
-
-#if !defined simple || !defined obj_like || !defined fun_like
-#error Missed some macros with -C
-#endif
-
-#ifdef not_a_macro
-#error not_a_macro is!
-#endif
-
-/* Check obj_like doesn't expect arguments, and fun_like does. */
-obj_like
-fun_like (foo, bar)
-
-/* Check OK to redefine fun_like without comments in the params. */
-#define fun_like(x, y)/**/
-
-/* Check comments in macros in directives are OK. */
-#define ZERO 0 /* A trailing comment. */
-
-#if ZERO
-#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/cmdlne-C2.c b/gcc/testsuite/gcc.dg/cpp/trad/cmdlne-C2.c
deleted file mode 100644
index 6836e9e9357..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/cmdlne-C2.c
+++ /dev/null
@@ -1,15 +0,0 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc. */
-
-/* { dg-do preprocess } */
-/* { dg-options "-C -traditional-cpp" } */
-
-/* Test that comments are actually written out
-
- Neil Booth, 24 Jun 2002. */
-
-/*
- { dg-final { if ![file exists cmdlne-C2.i] { return } } }
- { dg-final { if { [grep cmdlne-C2.i "dg-final"] != "" } { return } } }
- { dg-final { fail "cmdlne-C2.i: C comments output with -C" } }
-*/
-
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/cmdlne-dD.c b/gcc/testsuite/gcc.dg/cpp/trad/cmdlne-dD.c
deleted file mode 100644
index 1e4c8c867c9..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/cmdlne-dD.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* Copyright (C) 2000, 2002 Free Software Foundation, Inc. */
-
-/* { dg-do preprocess } */
-/* { dg-options "-dD -traditional-cpp" } */
-
-/* Test -dD does not fail. */
-
-#define objlike obj like
-#define funlike(like) fun like
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/cmdlne-dM.c b/gcc/testsuite/gcc.dg/cpp/trad/cmdlne-dM.c
deleted file mode 100644
index 0fb5bd9ddb5..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/cmdlne-dM.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* Copyright (C) 2000, 2002 Free Software Foundation, Inc. */
-
-/* { dg-do preprocess } */
-/* { dg-options "-dM -traditional-cpp" } */
-
-/* Test -dM does not fail. */
-
-#define objlike obj like
-#define funlike(like) fun like
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/comment-2.c b/gcc/testsuite/gcc.dg/cpp/trad/comment-2.c
deleted file mode 100644
index 8d54e3a0f32..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/comment-2.c
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Test for warning of nested comments. */
-
-/* { dg-do preprocess } */
-
-/* { dg-options "-traditional-cpp -Wcomments" }
-
-/* /* */ /* { dg-warning "within comment" } */
-
-/*
-
- /* { dg-warning "within comment" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/comment.c b/gcc/testsuite/gcc.dg/cpp/trad/comment.c
deleted file mode 100644
index ce9d7f18e1c..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/comment.c
+++ /dev/null
@@ -1,5 +0,0 @@
-/* Test for warning of unterminated comment. */
-
-/* { dg-do preprocess } */
-
-/* { dg-warning "unterminated comment" }
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/define.c b/gcc/testsuite/gcc.dg/cpp/trad/define.c
deleted file mode 100644
index d83288df23e..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/define.c
+++ /dev/null
@@ -1,2 +0,0 @@
-/* { dg-do preprocess } */
-/* { dg-options "-traditional-cpp -DDEFINE1DEFINE -DDEFINE2DEFIN=" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/defined.c b/gcc/testsuite/gcc.dg/cpp/trad/defined.c
deleted file mode 100644
index a24ecd519ea..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/defined.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc. */
-
-/* { dg-do preprocess } */
-
-/* Tests tradcpp0 with defined. The defined operator in traditional C
- works just the same as the defined operator in Standard C. */
-
-/* Source: Zack Weinberg, glibc, Neil Booth 11 Dec 2000. */
-
-#if defined REGPARMS
-#error REGPARMS should not be defined
-#endif
-
-#define REGPARMS 1
-#if !defined REGPARMS
-#error REGPARMS should be defined
-#endif
-
-#define defined /* { dg-error "defined" } */
-
-/* No diagnostics, though you could argue there should be. */
-#if defined defined
-#error defined is defined!
-#endif
-
-#define is_Z_defined defined Z
-
-#if defined Z
-#error Z is not defined
-#endif
-
-/* The behaviour of "defined" when it comes from a macro expansion is
- now documented. */
-#if is_Z_defined
-#error Macro expanding into defined operator test 1
-#endif
-
-#define Z
-
-#if !defined Z
-#error Z is defined
-#endif
-
-#if !is_Z_defined
-#error Macro expanding into defined operator test 2
-#endif
-
-#undef is_Z_defined
-#undef Z
-
-/* Do all the tests over again with the () form of defined. */
-
-/* No diagnostics, though you could argue there should be. */
-#if defined(defined)
-#error defined is defined!
-#endif
-
-#define is_Z_defined defined ( Z )
-
-#if defined(Z)
-#error Z is not defined
-#endif
-
-/* The behaviour of "defined" when it comes from a macro expansion is
- now documented. */
-#if is_Z_defined
-#error Macro expanding into defined operator test 1
-#endif
-
-#define Z
-
-#if !defined(Z)
-#error Z is defined
-#endif
-
-#if !is_Z_defined
-#error Macro expanding into defined operator test 2
-#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/directive.c b/gcc/testsuite/gcc.dg/cpp/trad/directive.c
deleted file mode 100644
index 04203097b24..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/directive.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Test for some basic aspects of -traditional directive processing. */
-
-/* { dg-do preprocess } */
-
-/* There is a #error directive. */
-
-#error bad /* { dg-error "bad" } */
-
-/* Directives with their #s indented are not recognized. */
- #if 0 /* { dg-bogus "unterminated" } */
-
-#wrong /* { dg-error "invalid" } */
-
-#define foo 2
-#define bar + 3
-#define foobar 6
-
-#if foo/**/bar != 5
-# error Comments in directive is a separator /* { dg-bogus "error" } */
-#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/escaped-eof.c b/gcc/testsuite/gcc.dg/cpp/trad/escaped-eof.c
deleted file mode 100644
index 37ca95c6918..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/escaped-eof.c
+++ /dev/null
@@ -1,6 +0,0 @@
-/* Test for warning of escaped EOF. */
-
-/* { dg-do preprocess } */
-
-/* { dg-warning "backslash-new" "escaped EOF warning" { target *-*-* } 7 } */
-\
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/escaped-nl.c b/gcc/testsuite/gcc.dg/cpp/trad/escaped-nl.c
deleted file mode 100644
index be8cc53fe65..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/escaped-nl.c
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Test escaped newlines at start of macro definition are properly
- skipped (buglet in skip_whitespace () in cpptrad.c). */
-
-/* { dg-do preprocess } */
-
-#define NUM \
-100
-#if NUM != 100
-# error NUM not defined properly /* { dg-bogus "error" } */
-#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/funlike-2.c b/gcc/testsuite/gcc.dg/cpp/trad/funlike-2.c
deleted file mode 100644
index edcf2abf200..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/funlike-2.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Test that nested commas and parentheses in macro arguments are
- OK. */
-
-/* { dg-do preprocess } */
-
-#define f(x) x
-#define g(x, y) x y
-
-#if f((1)) != 1
-# error /* { dg-bogus "error" "nested parens 1" } */
-#endif
-
-#if f((1, 2)) != 2
-# error /* { dg-bogus "error" "nested comma 1" } */
-#endif
-
-#if g(, (1)) != 1
-# error /* { dg-bogus "error" "nested parens 2" } */
-#endif
-
-#if g((1, 2), + 3) != 5
-# error /* { dg-bogus "error" "nested comma 2" } */
-#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/funlike-3.c b/gcc/testsuite/gcc.dg/cpp/trad/funlike-3.c
deleted file mode 100644
index 5300afba708..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/funlike-3.c
+++ /dev/null
@@ -1,12 +0,0 @@
-/* Test that function-like macros are restricted to directives, and
- that unterminated ones are warned about. */
-
-/* { dg-do preprocess } */
-
-#define f(x) x
-
-#if 2 f(/* { dg-error "unterminated" "unterminated macro in directive" } */
-)
-#endif
-
-f( /* { dg-error "unterminated" "unterminated macro" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/funlike-4.c b/gcc/testsuite/gcc.dg/cpp/trad/funlike-4.c
deleted file mode 100644
index fcc65a8d60d..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/funlike-4.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Test that undefined names evaluate to zero, that macros after a
- funlike macro are expanded, and that if it is a '(' the funlike
- macro is not treated as such. */
-
-/* { dg-do run } */
-
-extern void abort (void);
-
-#define f(x) x
-
-int main ()
-{
-#if f(1) == f /**/ (/**/1/**/)
- int x;
-#endif
-
- x = 0;
- if (f
- /**/ (
- /**/ 0/**/
- /**/)
- )
- abort ();
-
- return 0;
-}
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/funlike.c b/gcc/testsuite/gcc.dg/cpp/trad/funlike.c
deleted file mode 100644
index db550d53c76..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/funlike.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Test that undefined names evaluate to zero, that macros after a
- funlike macro are expanded, and that if it is a '(' the funlike
- macro is not treated as such. */
-
-/* { dg-do preprocess } */
-
-#define f(x) x
-#define h != 0
-#define i
-#define paren (
-
-#if f != 0
-# error /* { dg-bogus "error" "undefined name" } */
-#endif
-
-#if f h
-# error /* { dg-bogus "error" "h not expanded" } */
-#endif
-
-#if f i
-# error /* { dg-bogus "error" "empty macro" } */
-#endif
-
-#if f paren 6) /* { dg-error "missing binary" "macro-expanded parenthesis" } */
-#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/hash.c b/gcc/testsuite/gcc.dg/cpp/trad/hash.c
deleted file mode 100644
index 8108c89fbfc..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/hash.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Test for erroneously thinking comments are token-pastes.
- From XFree86 4.0. */
-/* { dg-do preprocess } */
-
-#ifndef foo
-#define foo /**/
-#endif
-
-#ifndef foo
-#define foo /* as nothing */
-#endif
-
-/* { dg-bogus "(start|end) of macro" "paste at end" { target *-*-* } 7 } */
-/* { dg-bogus "(start|end) of macro" "comment at end" { target *-*-* } 11 } */
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/include.c b/gcc/testsuite/gcc.dg/cpp/trad/include.c
deleted file mode 100644
index 9ca184b5d82..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/include.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* Copyright (c) 2002 Free Software Foundation Inc. */
-
-/* Test that macros are not expanded in the <> quotes of #inlcude. */
-
-/* { dg-do preprocess } */
-
-#define __STDC__ 1 /* Stop complaints about non-ISO compilers. */
-#define stdio 1
-#include <stdio.h> /* { dg-bogus "o such file or directory" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/literals-1.c b/gcc/testsuite/gcc.dg/cpp/trad/literals-1.c
deleted file mode 100644
index 7fde0d5422e..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/literals-1.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Test that (what looks like) comments are not recognised in literals
- and that quotes within quotes do not confused the preprocessor. */
-
-/* { dg-do run } */
-
-extern void abort (void);
-
-int main ()
-{
- const char *str1 = "/*";
- const char *str2 = "'";
-
- if (str1[0] != '/' || str1[1] != '*' || str1[2] != '\0')
- abort ();
-
- if (str2[0] != '\'' || str2[1] != '\0')
- abort ();
-
-#if '"' != '\"'
-# error /* { dg-bogus "error" "double quote in charconst" } */
-#endif
-
-#if !'\''
-# error quote /* { dg-bogus "quote" "quote in charconst" } */
-#endif
-
- return 0;
-}
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/literals-2.c b/gcc/testsuite/gcc.dg/cpp/trad/literals-2.c
deleted file mode 100644
index 807bb0db0a8..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/literals-2.c
+++ /dev/null
@@ -1,8 +0,0 @@
-/* Test that unterminated quotes in CPP expressions are
- recognized. */
-
-/* { dg-do preprocess } */
-
-/* { dg-error "missing terminating" "bad charconst" { target *-*-* } 7 } */
-#if 'x
-#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/maccom1.c b/gcc/testsuite/gcc.dg/cpp/trad/maccom1.c
deleted file mode 100644
index da9c4a1e7dd..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/maccom1.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* { dg-do preprocess } */
-/* { dg-options "-CC -traditional-cpp" } */
-
-/* This tests to make sure that comments are ignored between # and the
- directive name when the -CC option is used.
-
- Jason R. Thorpe, 6 Apr 2002 */
-
-#/**/define def passed
-
-def
-
-/*
- { dg-final { if ![file exists maccom1.i] { return } } }
- { dg-final { if { [grep maccom1.i "^passed"] != "" } { return } } }
- { dg-final { fail "maccom1.c: comment between # and directive name with -CC" } }
-*/
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/maccom2.c b/gcc/testsuite/gcc.dg/cpp/trad/maccom2.c
deleted file mode 100644
index 331c9fc8c83..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/maccom2.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/* { dg-do preprocess } */
-/* { dg-options "-CC -traditional-cpp" } */
-
-/* This tests to make sure that comments between the #define directive
- and the macro identifier are ignored (i.e. treated like whitespace)
- when the -CC option is used.
-
- Jason R. Thorpe, 6 Apr 2002 */
-
-#define/**/def passed
-
-def
-
-/*
- { dg-final { if ![file exists maccom2.i] { return } } }
- { dg-final { if { [grep maccom2.i "^passed"] != "" } { return } } }
- { dg-final { fail "maccom2.c: comment between #define and identifier with -CC" } }
-*/
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/maccom3.c b/gcc/testsuite/gcc.dg/cpp/trad/maccom3.c
deleted file mode 100644
index b3dd3acba41..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/maccom3.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* { dg-do preprocess } */
-/* { dg-options "-CC -traditional-cpp" } */
-
-/* This tests to make sure that comments in the definition of a macro
- parameter list are ignored when the -CC option is used.
-
- Jason R. Thorpe, 6 Apr 2002 */
-
-#define def(x /**/, y) passed
-
-def(x,y)
-
-/*
- { dg-final { if ![file exists maccom3.i] { return } } }
- { dg-final { if { [grep maccom3.i "^passed"] != "" } { return } } }
- { dg-final { fail "maccom3.c: comment in macro parameter list with -CC" } }
-*/
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/maccom4.c b/gcc/testsuite/gcc.dg/cpp/trad/maccom4.c
deleted file mode 100644
index e962d2824dd..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/maccom4.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/* { dg-do preprocess } */
-/* { dg-options "-CC -traditional-cpp" } */
-
-/* This tests to make sure the comment is saved in the macro and copied
- to the output file when the macro is expanded when the -CC option is
- used.
-
- Jason R. Thorpe, 6 Apr 2002 */
-
-#define def /* passed */
-
-def
-
-/*
- /* The + in the regexp prevents it from matching itself. */
- { dg-final { if ![file exists maccom4.i] { return } } }
- { dg-final { if { [grep maccom4.i "p+assed"] != "" } { return } } }
- { dg-final { fail "maccom4.c: comment in macro expansion with -CC" } }
-*/
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/maccom6.c b/gcc/testsuite/gcc.dg/cpp/trad/maccom6.c
deleted file mode 100644
index 13f0fc59bdc..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/maccom6.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/* { dg-do preprocess } */
-/* { dg-options "-CC -traditional-cpp" } */
-
-/* This tests to make sure that expressions function properly
- when used with macros containing comments and the -CC option
- is being used.
-
- Jason R. Thorpe, 6 Apr 2002 */
-
-#define ONE 1 /* one */
-#define TWO 2 /* two */
-#define THREE 3 /* three */
-
-#if (ONE + TWO) != THREE
-failed
-#else
-passed
-#endif
-
-/*
- { dg-final { if ![file exists maccom6.i] { return } } }
- { dg-final { if { [grep maccom6.i "^passed"] != "" } { return } } }
- { dg-final { fail "maccom6.c: comments in macro expressions with -CC" } }
-*/
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/macroargs.c b/gcc/testsuite/gcc.dg/cpp/trad/macroargs.c
deleted file mode 100644
index ce28cccf995..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/macroargs.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Test that whitespace in arguments is preserved, and that each
- newline in macro arguments become a space. */
-
-/* { dg-do run } */
-
-#define f(x, y) "x y"
-#define g(x) x
-
-extern void abort (void);
-
-int main ()
-{
- const char *str1 = f( foo ,bar);
- const char *str2 = f(
-foo
-,bar);
-
- if (strcmp (str1, " foo bar"))
- abort ();
-
- if (strcmp (str1, str2))
- abort ();
-
- /* Verify that quoted state is preserved over a newline. */
- if (strcmp (g /* { dg-bogus "unterminated 2" } */ ("1
-, 2"), "1 , 2"))
- abort ();
-
- return 0;
-}
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/mi1.c b/gcc/testsuite/gcc.dg/cpp/trad/mi1.c
deleted file mode 100644
index deb992920f8..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/mi1.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Test "ignore redundant include" facility.
-
- We must test with C comments, and null directives, outside
- the guard conditional; also, we test guarding with #ifndef and #if
- !defined. -H is used because cpp might confuse the issue by
- optimizing out #line markers. This test only passes if each of the
- headers is read exactly once.
-
- The disgusting regexp in the dg-error line, when stuck into
- dg.exp's compiler-output regexp, matches the correct -H output and
- only the correct -H output. It has to be all on one line because
- otherwise it will not be interpreted all in one unit. */
-
-/* { dg-do compile }
- { dg-options "-H -traditional-cpp" }
- { dg-error "mi1c\.h\n\[^\n\]*mi1nd\.h\n\[^\n\]*mi1ndp\.h\n\[^\n\]*mi1x\.h" "redundant include check" { target *-*-* } 0 } */
-
-#include "mi1c.h"
-#include "mi1c.h"
-#include "mi1c.h"
-
-#include "mi1nd.h"
-#include "mi1nd.h"
-
-#include "mi1ndp.h"
-#include "mi1ndp.h"
-
-#define MIX_H
-#include "mi1x.h"
-#include "mi1x.h"
-
-int
-main (void)
-{
- return a + c + d;
-}
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/mi1c.h b/gcc/testsuite/gcc.dg/cpp/trad/mi1c.h
deleted file mode 100644
index 2956286eb22..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/mi1c.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/* Redundant header include test with C comments at top. */
-# /* And a null directive at the top. */
-
-#ifndef CPP_MIC_H
-#define CPP_MIC_H
-
-int a;
-
-#endif
-
-# /* And at the end, too! */
-/* And at the end too! */
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/mi1nd.h b/gcc/testsuite/gcc.dg/cpp/trad/mi1nd.h
deleted file mode 100644
index c14c1a3c661..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/mi1nd.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/* Redundant include check with #if !defined. */
-
-#if !defined CPP_MIND_H
-#define CPP_MIND_H
-
-int c;
-
-#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/mi1ndp.h b/gcc/testsuite/gcc.dg/cpp/trad/mi1ndp.h
deleted file mode 100644
index b84202c6d33..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/mi1ndp.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#if !defined ( CPP_MINDP_H)
-#define CPP_MINDP_H
-
-/* Redundant include check with #if !defined and parentheses. */
-int d;
-
-#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/mi1x.h b/gcc/testsuite/gcc.dg/cpp/trad/mi1x.h
deleted file mode 100644
index a317cf852bf..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/mi1x.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* This header is never to have its contents visible, but it should
- still receive the optimization. */
-
-#ifndef MIX_H
-#define MIX_H
-
-#define main wibble
-
-#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/mi2.c b/gcc/testsuite/gcc.dg/cpp/trad/mi2.c
deleted file mode 100644
index 916d5a949d0..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/mi2.c
+++ /dev/null
@@ -1,12 +0,0 @@
-/* Test for overly eager multiple include optimization.
- Problem distilled from glibc 2.0.7's time.h, sys/time.h, timebits.h.
- Problem noted by Tom Tromey <tromey@cygnus.com>. */
-/* { dg-do compile } */
-
-#include "mi2a.h"
-#include "mi2b.h"
-
-int main (void)
-{
- return x;
-}
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/mi2a.h b/gcc/testsuite/gcc.dg/cpp/trad/mi2a.h
deleted file mode 100644
index e3f53b6cb2e..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/mi2a.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/* Test for overly eager multiple include optimization.
- Problem distilled from glibc 2.0.7's time.h, sys/time.h, timebits.h.
- Problem noted by Tom Tromey <tromey@cygnus.com>. */
-
-#include "mi2c.h"
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/mi2b.h b/gcc/testsuite/gcc.dg/cpp/trad/mi2b.h
deleted file mode 100644
index 1d9a8b9b1c5..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/mi2b.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/* Test for overly eager multiple include optimization.
- Problem distilled from glibc 2.0.7's time.h, sys/time.h, timebits.h.
- Problem noted by Tom Tromey <tromey@cygnus.com>. */
-
-#define need_x
-#include "mi2c.h"
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/mi2c.h b/gcc/testsuite/gcc.dg/cpp/trad/mi2c.h
deleted file mode 100644
index 521792bee2f..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/mi2c.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* Test for overly eager multiple include optimization.
- Problem distilled from glibc 2.0.7's time.h, sys/time.h, timebits.h.
- Problem noted by Tom Tromey <tromey@cygnus.com>. */
-#ifdef need_x
-#undef need_x
-#ifndef have_x
-#define have_x
-extern int x;
-#endif
-#endif
-
-#ifndef t_h
-#define t_h
-extern int y;
-#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/mi3.c b/gcc/testsuite/gcc.dg/cpp/trad/mi3.c
deleted file mode 100644
index f33fd7887e9..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/mi3.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Another test case for over-eager multiple include optimization.
- This one distilled from glibc's setlocale.c and categories.def. */
-/* { dg-do compile } */
-
-#define X a
-#include "mi3.def"
-#undef X
-
-#define X b
-#include "mi3.def"
-#undef X
-
-#include "mi3.h"
-#include "mi3.h" /* The second include declares variable c. */
-
-int
-main(void)
-{
- return a + b + c;
-}
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/mi3.def b/gcc/testsuite/gcc.dg/cpp/trad/mi3.def
deleted file mode 100644
index 375d9c7fe34..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/mi3.def
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Another test case for over-eager multiple include optimization.
- This one distilled from glibc's setlocale.c and categories.def.
- The #ifdef block doesn't cover the entire file, so it must not be
- taken for a reinclude guard. */
-
-#ifndef NO_POSTLOAD
-#define NO_POSTLOAD NULL
-#endif
-
-int X;
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/mi3.h b/gcc/testsuite/gcc.dg/cpp/trad/mi3.h
deleted file mode 100644
index 8774fcf486a..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/mi3.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Another test case for over-eager multiple include optimization. */
-
-#ifndef GUARD
-#define GUARD
-#elif 1 /* #elif kills optimisation */
-int c;
-#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/mi4.c b/gcc/testsuite/gcc.dg/cpp/trad/mi4.c
deleted file mode 100644
index c886cc2c8e5..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/mi4.c
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc. */
-
-/* { dg-do preprocess } */
-
-/* Undefining a macro guard and re-including the file used to confuse
- file caching in cppfiles.c, and attempt to open a bad fd. */
-
-#include "mi1c.h"
-#undef CPP_MIC_H
-#include "mi1c.h"
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/mi5.c b/gcc/testsuite/gcc.dg/cpp/trad/mi5.c
deleted file mode 100644
index fe3c8d202d3..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/mi5.c
+++ /dev/null
@@ -1,13 +0,0 @@
-/* Test "ignore redundant include" facility, with -C on.
-
- The disgusting regexp in the dg-error line, when stuck into
- dg.exp's compiler-output regexp, matches the correct -H output and
- only the correct -H output. It has to be all on one line because
- otherwise it will not be interpreted all in one unit. */
-
-/* { dg-do preprocess }
- { dg-options "-H -C -traditional-cpp" }
- { dg-error "mi1c\.h" "redundant include check with -C" { target *-*-* } 0 } */
-
-#include "mi1c.h"
-#include "mi1c.h"
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/mi6.c b/gcc/testsuite/gcc.dg/cpp/trad/mi6.c
deleted file mode 100644
index aa1c8ed2ec5..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/mi6.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Another test case for over-eager multiple include optimization,
- where the leading "#if !defined" expression is obtained partially,
- or wholly, from macros. Neil Booth, 30 Sep 2001. */
-
-/* { dg-do compile } */
-/* { dg-options "" } */
-
-/* Each include file should not be subject to MI optimisation, since
- macro definitions can change. Each header increments the variable
- VAR if it is defined.
-
- The first set of inclusions gets the headers into CPP's cache, but
- does nothing since VAR is not defined. The second set should each
- increment VAR, since none of the initial set should have been
- flagged as optimizable. */
-
-#define EMPTYL
-#define EMPTYR
-#define NOT !
-#define DEFINED defined (guard)
-#define NOT_DEFINED ! defined (guard)
-
-#include "mi6a.h"
-#include "mi6b.h"
-#include "mi6c.h"
-#include "mi6d.h"
-#include "mi6e.h"
-
-/* Define the macro guard, and redefine the macros to something that
- forces compilation of the conditional blocks. */
-#define guard
-#undef EMPTYL
-#define EMPTYL 1 ||
-#undef EMPTYR
-#define EMPTYR || 1
-#undef NOT
-#define NOT
-#undef DEFINED
-#define DEFINED 0
-#undef NOT_DEFINED
-#define NOT_DEFINED 1
-
-#define VAR five
-
-int
-main(void)
-{
- unsigned int five = 0;
-
-#include "mi6a.h"
-#include "mi6b.h"
-#include "mi6c.h"
-#include "mi6d.h"
-#include "mi6e.h"
-
- if (five != 5)
- abort ();
- return 0;
-}
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/mi6a.h b/gcc/testsuite/gcc.dg/cpp/trad/mi6a.h
deleted file mode 100644
index 68a2fce4758..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/mi6a.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#if NOT_DEFINED
- #ifdef VAR
- VAR++;
- #endif
-#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/mi6b.h b/gcc/testsuite/gcc.dg/cpp/trad/mi6b.h
deleted file mode 100644
index d2fe8be1784..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/mi6b.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#if NOT defined (guard)
- #ifdef VAR
- VAR++;
- #endif
-#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/mi6c.h b/gcc/testsuite/gcc.dg/cpp/trad/mi6c.h
deleted file mode 100644
index d19cb54335f..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/mi6c.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#if !DEFINED
- #ifdef VAR
- VAR++;
- #endif
-#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/mi6d.h b/gcc/testsuite/gcc.dg/cpp/trad/mi6d.h
deleted file mode 100644
index a1eabba8e92..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/mi6d.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#if EMPTYL !defined (guard)
- #ifdef VAR
- VAR++;
- #endif
-#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/mi6e.h b/gcc/testsuite/gcc.dg/cpp/trad/mi6e.h
deleted file mode 100644
index 26ba7151475..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/mi6e.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#if !defined (guard) EMPTYR
- #ifdef VAR
- VAR++;
- #endif
-#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/mi7.c b/gcc/testsuite/gcc.dg/cpp/trad/mi7.c
deleted file mode 100644
index 8a079d9dd57..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/mi7.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Test "ignore redundant include" facility.
-
- -H is used because cpp might confuse the issue by optimizing out
- #line markers. This test only passes if the headers is read
- twice.
-
- The disgusting regexp in the dg-error line, when stuck into
- dg.exp's compiler-output regexp, matches the correct -H output and
- only the correct -H output. It has to be all on one line because
- otherwise it will not be interpreted all in one unit. */
-
-/* { dg-do preprocess }
- { dg-options "-H -traditional-cpp" }
- { dg-error "mi7a\.h\n\[^\n\]*mi7a\.h\n\[^\n\]*mi7b\.h\n\[^\n\]*mi7b\.h" "redundant include check" { target *-*-* } 0 } */
-
-#include "mi7a.h"
-#include "mi7a.h"
-#include "mi7b.h"
-#include "mi7b.h"
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/mi7a.h b/gcc/testsuite/gcc.dg/cpp/trad/mi7a.h
deleted file mode 100644
index 0c701d7e645..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/mi7a.h
+++ /dev/null
@@ -1,4 +0,0 @@
-:
-#ifndef GUARD1
-#define GUARD1
-#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/mi7b.h b/gcc/testsuite/gcc.dg/cpp/trad/mi7b.h
deleted file mode 100644
index 1747e54825e..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/mi7b.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifndef GUARD2
-#define GUARD2
-#endif
-:
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/null-drctv.c b/gcc/testsuite/gcc.dg/cpp/trad/null-drctv.c
deleted file mode 100644
index 99fd251f2e3..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/null-drctv.c
+++ /dev/null
@@ -1,6 +0,0 @@
-/* Test that the null directive doesn't swallow the following line. */
-
-/* { dg-do preprocess } */
-
-#
-#error OK /* { dg-error "OK" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/num-sign.c b/gcc/testsuite/gcc.dg/cpp/trad/num-sign.c
deleted file mode 100644
index 7522bbf41e2..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/num-sign.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc. */
-
-/* { dg-do preprocess { target i?86-*-* } } */
-
-/* Tests that traditional numbers are signed, unless otherwise
- specified. This test assumes a 32 bit target.
-
- Neil Booth, 5 Aug 2001. Inspired by PR 3824. */
-
-#if 0xffffffffffffffff >= 0
-# error 0xffffffffffffffff /* { dg-bogus "0xffffffffffffffff" "0xffffffffffffffff positive" } */
-#endif
-
-#if 0xffffffffffffffffU <= 0
-# error 0xffffffffffffffffU /* { dg-bogus "0xffffffffffffffffU" "0xffffffffffffffffU negative" } */
-#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/paste.c b/gcc/testsuite/gcc.dg/cpp/trad/paste.c
deleted file mode 100644
index 9f1c0db3291..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/paste.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/* Test for proper comment elimination semantics from cpplib's -traditional.
- This should compile and link with compiled with `gcc -traditional-cpp'.
- Test case by Jason R. Thorpe <thorpej@zembu.com>. */
-
-/* { dg-do compile } */
-
-#define A(name) X/**/name
-
-#define B(name) \
-void A(Y/**/name)() { A(name)(); }
-
-void Xhello() { printf("hello world\n"); }
-
-B(hello)
-
-int main() { XYhello(); return (0); }
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/quote.c b/gcc/testsuite/gcc.dg/cpp/trad/quote.c
deleted file mode 100644
index f8e61700fd7..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/quote.c
+++ /dev/null
@@ -1,6 +0,0 @@
-/* Test that unterminated quotes are OK when only preprocessing. */
-
-/* { dg-do preprocess } */
-
-/* { dg-bogus "unterminated" } */ 'x
-/* { dg-bogus "unterminated" } */ "x
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/recurse-1.c b/gcc/testsuite/gcc.dg/cpp/trad/recurse-1.c
deleted file mode 100644
index b5fd7af7f5f..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/recurse-1.c
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Test for warning of and recovery from recursion in object-like
- macros. */
-
-/* { dg-do preprocess } */
-
-#define foo foo
-foo /* { dg-error "detected recursion" } */
-
-#define bar a bar b
-bar /* { dg-error "detected recursion" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/recurse-2.c b/gcc/testsuite/gcc.dg/cpp/trad/recurse-2.c
deleted file mode 100644
index 5c6550fae2a..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/recurse-2.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/* Test for warning of and recovery from recursion in function-like
- macros. */
-
-/* { dg-do preprocess } */
-
-#define foo() foo()
-foo(); /* { dg-error "detected recursion" } */
-
-#define bar() bar baz() bar
-bar(); /* { dg-bogus "detected recursion" } */
-
-#define baz() foo()
-baz(); /* { dg-error "detected recursion" } */
-
-#define a(x) x(a)
-a(a); /* { dg-error "detected recursion" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/recurse-3.c b/gcc/testsuite/gcc.dg/cpp/trad/recurse-3.c
deleted file mode 100644
index 91485ae5f45..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/recurse-3.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Tests that macros that look recursive but are not are accepted. */
-
-/* { dg-do preprocess } */
-
-#define g(x) x
-g(g(g(g(g(g(g)))))); /* { dg-bogus "detected recursion" } */
-
-/* This macro gets longer with each loop, to thwart tests for
- recursion based on length. */
-#define f(a,b,c,d,e,f,g,h,i) a(b,c,d,e,f,g,h,i,2 3 4 5)
-f(f,f,f,f,f,f,f,f,f) /* { dg-bogus "detected recursion" } */
-
-/* The above cases should be enough, but this is taken from cccp
- sources so let's try it too. */
-#define foo(x,y) bar (x (y,0), y)
-foo (foo, baz); /* { dg-bogus "detected recursion" } */
-
-#define mac mac/**/ro
-mac /* { dg-bogus "detected recursion" } */
-
-#define mac2 mac2
-"mac2" /* { dg-bogus "detected recursion" } */
-
-#define macro "macro
-macro mac2 /* { dg-bogus "detected recursion" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/redef1.c b/gcc/testsuite/gcc.dg/cpp/trad/redef1.c
deleted file mode 100644
index ce5dde0bb37..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/redef1.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Test for redefining traditional macros with insignificant
- (i.e. whitespace) differences. */
-
-/* { dg-do preprocess } */
-
-
-#define foo bar
-#define /* x */ foo /* x */ bar /* x */
-
-#define quux(thud) a one and a thud and a two
-#define /**/ quux( thud ) /**/ a one and a /**/ thud /**/ and /**/ a two
-#define quux(thud) a one and a thud and a two /* bah */
-
-#define f(x, y)x "x y z" y
-#define f(x, y) x "x y z" y
-
-#define baz() whiz bang
-#define baz() whiz bang
-
-#define g foo
-#undef g
-#define g
-
-/* { dg-bogus "redefined" "foo redefined" { target *-*-* } 8 } */
-/* { dg-bogus "redefined" "quux redefined" { target *-*-* } 11 } */
-/* { dg-bogus "redefined" "quux redefined" { target *-*-* } 12 } */
-/* { dg-bogus "redefined" "f redefined" { target *-*-* } 15 } */
-/* { dg-bogus "redefined" "baz redefined" { target *-*-* } 18 } */
-/* { dg-bogus "redefined" "g redefined" { target *-*-* } 22 } */
-
-/* { dg-bogus "previous def" "foo prev def" { target *-*-* } 7 } */
-/* { dg-bogus "previous def" "quux prev def" { target *-*-* } 10 } */
-/* { dg-bogus "previous def" "quux prev def" { target *-*-* } 11 } */
-/* { dg-bogus "previous def" "f prev def" { target *-*-* } 14 } */
-/* { dg-bogus "previous def" "baz prev def" { target *-*-* } 17 } */
-/* { dg-bogus "previous def" "g prev def" { target *-*-* } 20 } */
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/redef2.c b/gcc/testsuite/gcc.dg/cpp/trad/redef2.c
deleted file mode 100644
index 269a846266f..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/redef2.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Test for redefining traditional macros with significant differences. */
-
-/* { dg-do preprocess } */
-
-#define foo bar /* { dg-warning "previous def" "foo prev def" } */
-#define foo barr /* { dg-warning "redefined" "foo redefined" } */
-
-#undef foo
-#define foo bar /* { dg-warning "previous def" "foo prev def 2" } */
-#define foo() bar /* { dg-warning "redefined" "foo redefined 2" } */
-
-#undef foo
-#define foo() bar /* { dg-warning "previous def" "foo prev def" } */
-#define foo() barr /* { dg-warning "redefined" "foo redefined" } */
-
-#define quux(thud) a thud b /* { dg-warning "previous def" "quux prev def" } */
-#define quux(thu) a thud b /* { dg-warning "redefined" "quux redefined" } */
-
-#define bar(x, y) x+y /* { dg-warning "previous def" "bar prev def" } */
-#define bar(x, y) x+x /* { dg-warning "redefined" "bar redefined" } */
-
-#define bat(x, y) x+y /* { dg-warning "previous def" "bat prev def" } */
-#define bat(x, y) x+ y /* { dg-warning "redefined" "bat redefined" } */
-
-#define baz(x, y) x+y /* { dg-warning "previous def" "baz prev def" } */
-#define baz(x, y) x +y /* { dg-warning "redefined" "baz redefined" } */
-
-#define f(x, y) "x y" /* { dg-warning "previous def" "f prev def" } */
-#define f(x, y) "x y" /* { dg-warning "redefined" "f redefined" } */
-
-#define g(x, y) 'x' /* { dg-warning "previous def" "g prev def" } */
-#define g(x, y) ' x' /* { dg-warning "redefined" "g redefined" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/strify.c b/gcc/testsuite/gcc.dg/cpp/trad/strify.c
deleted file mode 100644
index 500ef1ea32f..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/strify.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Test whether traditional stringify works. */
-/* { dg-do run } */
-
-#define foo(a, b) c="a"; d="b";
-
-extern void abort ();
-
-int main ()
-{
- char *c, *d;
-
- foo (p,q);
- if (c[0] != 'p' || d[0] != 'q')
- abort ();
-
- exit (0);
-}
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/trad.exp b/gcc/testsuite/gcc.dg/cpp/trad/trad.exp
deleted file mode 100644
index 60d90023007..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/trad.exp
+++ /dev/null
@@ -1,43 +0,0 @@
-# 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.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# GCC testsuite that uses the `dg.exp' driver.
-
-# There's a bunch of headers we need.
-if [is_remote host] {
- foreach header [glob -nocomplain $srcdir/$subdir/*.{h,def} ] {
- remote_download host $header
- }
-}
-
-# Load support procs.
-load_lib gcc-dg.exp
-
-# If a testcase doesn't have special options, use these.
-global DEFAULT_TRADCPPFLAGS
-if ![info exists DEFAULT_TRADCPPFLAGS] then {
- set DEFAULT_TRADCPPFLAGS " -traditional-cpp"
-}
-
-# Initialize `dg'.
-dg-init
-
-# Main loop.
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
- "" $DEFAULT_TRADCPPFLAGS
-
-# All done.
-dg-finish
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/uchar.c b/gcc/testsuite/gcc.dg/cpp/trad/uchar.c
deleted file mode 100644
index 8ea54a1f43c..00000000000
--- a/gcc/testsuite/gcc.dg/cpp/trad/uchar.c
+++ /dev/null
@@ -1,8 +0,0 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc. */
-
-/* { dg-do preprocess } */
-/* { dg-options "-funsigned-char -fsigned-char -traditional-cpp" } */
-
-#if defined (__CHAR_UNSIGNED__)
-# error __CHAR_UNSIGNED__ defined
-#endif