aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2003-09-14 13:52:56 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2003-09-14 13:52:56 +0000
commitaab68b4aba36b6664a150002cfcee50a3186b766 (patch)
tree5642ee473608bc15e3e4b9a9f8f7cf75df3c0d82 /gcc
parent93bad80ebc1ab5f6ee336002c26244b8eff5202e (diff)
downloadgcc-aab68b4aba36b6664a150002cfcee50a3186b766.zip
gcc-aab68b4aba36b6664a150002cfcee50a3186b766.tar.gz
gcc-aab68b4aba36b6664a150002cfcee50a3186b766.tar.bz2
separate-1.c: Adjust line of error.
* gcc.dg/cpp/separate-1.c: Adjust line of error. Test for correct non-expansion of functional macro name without arguments at EOL. * gcc.dg/cpp/spacing1.c: Revert 2003-08-04's change. Likewise. From-SVN: r71380
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.dg/cpp/separate-1.c7
-rw-r--r--gcc/testsuite/gcc.dg/cpp/spacing1.c26
3 files changed, 22 insertions, 17 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index b2f7a2f..9d7c8e5 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2003-09-14 Alexandre Oliva <aoliva@redhat.com>
+
+ * gcc.dg/cpp/separate-1.c: Adjust line of error. Test for correct
+ non-expansion of functional macro name without arguments at EOL.
+ * gcc.dg/cpp/spacing1.c: Revert 2003-08-04's change. Likewise.
+
2003-09-14 Richard Sandiford <rsandifo@redhat.com>
* gcc.c-torture/execute/20030914-[12].c: New tests.
diff --git a/gcc/testsuite/gcc.dg/cpp/separate-1.c b/gcc/testsuite/gcc.dg/cpp/separate-1.c
index 05e9c24..a80e001 100644
--- a/gcc/testsuite/gcc.dg/cpp/separate-1.c
+++ b/gcc/testsuite/gcc.dg/cpp/separate-1.c
@@ -8,5 +8,8 @@
#define FOO()
-int FOO(
- ), bar; /* { dg-error "(parse|syntax) error" "error on this line" } */
+int FOO( /* { dg-error "(parse|syntax) error" "error on this line" } */
+ ), bar;
+
+int baz FOO /* { dg-error "(parse|syntax) error" "error on this line" } */
+; /* { dg-warning "no type or storage class" "warning on this line" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/spacing1.c b/gcc/testsuite/gcc.dg/cpp/spacing1.c
index 362e9e1..2d70f86 100644
--- a/gcc/testsuite/gcc.dg/cpp/spacing1.c
+++ b/gcc/testsuite/gcc.dg/cpp/spacing1.c
@@ -14,14 +14,10 @@
invocation is not defined: we might consider them to be in the same
line as the initial token of the invocation, or as the final token
of the invocation, or even anything in between. We choose to make
- it the final token, but we might as well collapse the invocation
- and the rest of the line into the initial line, such that `g
- ... bam baz' below were all in a single line in the preprocessor
- output. We used to do this at some point, but it disagreed with
- the way we numbered lines with the integrated preprocessor, so we
- had to pick one of them to change.
+ it the initial token, such that everything that is in a logical
+ line ends up in a single line after preprocessing.
- Alexandre Oliva, Aug 5, 2003. */
+ Alexandre Oliva, Sept 13, 2003. */
#define str(x) #x
#define f(x) x
@@ -41,18 +37,18 @@
B Q B Q A Q A:
f
bar
-g
+A
+bad
+g "1 2" bam baz
-
-
- "1 2"
- bam baz
*/
glue (EMPTY 4, 4) EMPTY;
A(Q) C(Q) D()Q D():
f
bar
+A
+bad
f (g) str
(
1
@@ -64,6 +60,6 @@ f (g) str
{ dg-final { scan-file spacing1.i "B Q B Q A Q A:" } }
{ dg-final { scan-file-not spacing1.i "f\[^\n\]*bar" } }
{ dg-final { scan-file spacing1.i "(^|\n)bar" } }
- { dg-final { scan-file spacing1.i "(^|\n)g($|\n)" } }
- { dg-final { scan-file spacing1.i "(^|\n) \"1 2\"" } }
- { dg-final { scan-file spacing1.i "(^|\n) bam baz" } } */
+ { dg-final { scan-file spacing1.i "(^|\n)A($|\n)" } }
+ { dg-final { scan-file spacing1.i "(^|\n)bad($|\n)" } }
+ { dg-final { scan-file spacing1.i "g \"1 2\" bam baz" } } */