diff options
author | bothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-12 15:40:35 +0000 |
---|---|---|
committer | bothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-12 15:40:35 +0000 |
commit | 5db3e84328a14a9cd27e18becaeab012728c26ba (patch) | |
tree | 3912a3deb8afe557f69393c48d96477c7d08136a | |
parent | 97fd5bc72fda72a2f70cf2d5496018c08e9a76f4 (diff) | |
download | gcc-5db3e84328a14a9cd27e18becaeab012728c26ba.tar.gz |
* gcc.dg/decl-2.c: Add extra line breaks. That way we can verify
that diagnotics refer to correct token.
* gcc.dg/unused-3.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96339 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/decl-2.c | 10 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/unused-3.c | 6 |
3 files changed, 19 insertions, 3 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5e748ada585..d7c751d42e2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -17,6 +17,12 @@ 2005-03-11 Per Bothner <per@bothner.com> + * gcc.dg/decl-2.c: Add extra line breaks. That way we can verify + that diagnotics refer to correct token. + * gcc.dg/unused-3.c: Likewise. + +2005-03-11 Per Bothner <per@bothner.com> + * gcc.dg/cpp/direct2.c: With new lexer changes, error "before string constant" is now actually on same line as string constant. * gcc.dg/cpp/direct2s.c: Likewise. diff --git a/gcc/testsuite/gcc.dg/decl-2.c b/gcc/testsuite/gcc.dg/decl-2.c index 44fbc733027..ab1532e82b9 100644 --- a/gcc/testsuite/gcc.dg/decl-2.c +++ b/gcc/testsuite/gcc.dg/decl-2.c @@ -1,10 +1,16 @@ /* PR c/7411 */ /* Contributed by Christian Ehrhardt */ +/* Added extra line-breaks to check that diagnostics refer to correct token. + --Per Bothner. */ /* { dg-do compile } */ void foo(void) { - char c; /* { dg-error "previous declaration" } */ + char + c /* { dg-error "previous declaration" } */ + ; int i; - int c = i; /* { dg-error "conflicting types" } */ + int + c /* { dg-error "conflicting types" } */ + = i; } diff --git a/gcc/testsuite/gcc.dg/unused-3.c b/gcc/testsuite/gcc.dg/unused-3.c index 259b8d0fb79..120562448aa 100644 --- a/gcc/testsuite/gcc.dg/unused-3.c +++ b/gcc/testsuite/gcc.dg/unused-3.c @@ -1,10 +1,14 @@ /* Copyright (C) 2000 Free Software Foundation. */ +/* Added extra line-breaks to check that diagnostics refer to correct token. + --Per Bothner. */ /* { dg-do compile } */ /* { dg-options "-Wunused" } */ typedef short unused_type __attribute__ ((unused)); main () { - short x; /* { dg-warning "unused variable" "unused variable warning" } */ + short + x /* { dg-warning "unused variable" "unused variable warning" } */ + ; unused_type y; } |