diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-12 22:31:04 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-12 22:31:04 +0000 |
commit | 6c9278b0c46d24d52c55bb2e1edd4a437f059ce7 (patch) | |
tree | 396e9eb3781e3ea20599a3d2a23360d73b3cc621 /gcc/testsuite/gcc.dg/cpp/spacing2.c | |
parent | 14d19d6dc1f03f3fedd77a7a881802066d6106e3 (diff) | |
download | gcc-6c9278b0c46d24d52c55bb2e1edd4a437f059ce7.tar.gz |
* cppmain.c (struct printer): New member source.
(scan_translation_unit): Fix spacing at start of lines.
(cb_line_change): Update.
* gcc.dg/cpp/spacing2.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46237 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp/spacing2.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/spacing2.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/spacing2.c b/gcc/testsuite/gcc.dg/cpp/spacing2.c new file mode 100644 index 00000000000..760872aea39 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/spacing2.c @@ -0,0 +1,21 @@ +/* Copyright (C) 2001 Free Software Foundation, Inc. */ + +/* { dg-do preprocess } */ + +/* We used to output an unnecessary leading space, leading to Emacs + confusion with its Makefile abuse. + + Neil Booth, 12 Oct 2001. */ + +#define EMPTY +#define foo bar + +a = EMPTY +foo.. /* No leading space on output. */ + +/* + { dg-final { if ![file exists spacing2.i] { return } } } + { dg-final { if \{ [grep spacing2.i "^bar\.\."] != "" \} \{ } } + { dg-final { return \} } } + { dg-final { fail "spacing2.c: spacing issues" } } +*/ |