aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2003-08-06 21:33:32 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2003-08-06 21:33:32 +0000
commit372431b6c174c2e865fc0bc70e82cccf7b39d1a6 (patch)
tree0f3f8eb8ebb2984692f9ddd05d02e6ee9f992ea8
parenta32767e4522942ab7b582da2c60537e0c0034caa (diff)
downloadgcc-372431b6c174c2e865fc0bc70e82cccf7b39d1a6.zip
gcc-372431b6c174c2e865fc0bc70e82cccf7b39d1a6.tar.gz
gcc-372431b6c174c2e865fc0bc70e82cccf7b39d1a6.tar.bz2
* gcc.dg/cpp/spacing1.c: Update.
From-SVN: r70210
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/cpp/spacing1.c23
2 files changed, 25 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 9b8eeee..0e039d5 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2003-08-06 Alexandre Oliva <aoliva@redhat.com>
+
+ * gcc.dg/cpp/spacing1.c: Update.
+
2003-08-04 Janis Johnson <janis187@us.ibm.com>
PR target/11739
diff --git a/gcc/testsuite/gcc.dg/cpp/spacing1.c b/gcc/testsuite/gcc.dg/cpp/spacing1.c
index 2724960..362e9e1 100644
--- a/gcc/testsuite/gcc.dg/cpp/spacing1.c
+++ b/gcc/testsuite/gcc.dg/cpp/spacing1.c
@@ -10,6 +10,19 @@
Neil Booth, 1 Dec 2000, 23 Sep 2001. */
+/* The actual location of the expansion of a multi-line macro
+ 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.
+
+ Alexandre Oliva, Aug 5, 2003. */
+
#define str(x) #x
#define f(x) x
#define glue(x, y) x ## y
@@ -28,8 +41,12 @@
B Q B Q A Q A:
f
bar
-g "1 2" bam baz
+g
+
+
+ "1 2"
+ bam baz
*/
glue (EMPTY 4, 4) EMPTY;
@@ -47,4 +64,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 "g \"1 2\" bam baz" } } */
+ { 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" } } */