noncompile.exp: Remove poison-1 block.
* gcc.c-torture/noncompile/noncompile.exp: Remove poison-1 block. * gcc.c-torture/noncompile/poison-1.c: Move... * gcc.dg/poison-1.c: ...here, and adapt to dg framework. * gcc.dg/cpp-li1.c: Add a token after the #line. From-SVN: r34463
This commit is contained in:
parent
25dd13ece0
commit
fbc40ceddb
5 changed files with 30 additions and 32 deletions
|
@ -1,3 +1,10 @@
|
|||
2000-06-08 Zack Weinberg <zack@wolery.cumb.org>
|
||||
|
||||
* gcc.c-torture/noncompile/noncompile.exp: Remove poison-1 block.
|
||||
* gcc.c-torture/noncompile/poison-1.c: Move...
|
||||
* gcc.dg/poison-1.c: ...here, and adapt to dg framework.
|
||||
* gcc.dg/cpp-li1.c: Add a token after the #line.
|
||||
|
||||
2000-06-05 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* gcc.c-torture/execute/20000605-2.c: New test.
|
||||
|
|
|
@ -323,13 +323,3 @@ set compiler_output ".*:6:"
|
|||
set groups {passed gcc-noncompile}
|
||||
|
||||
postbase_with_opts $src_code $run $groups
|
||||
|
||||
# Test poison-1.c
|
||||
prebase
|
||||
|
||||
set src_code poison-1.c
|
||||
set compiler_output ".*c:2:.*c:4:.*c:5:.*c:7:.*c:8:.*c:9:.*c:11:.*c:12:.*c:13:.*c:14:.*c:17:.*c:20:"
|
||||
|
||||
set groups {passed gcc-noncompile}
|
||||
|
||||
postbase $src_code $run $groups
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
#pragma poison foo
|
||||
foo
|
||||
#pragma poison foo2 foo3
|
||||
foo2
|
||||
foo3
|
||||
#pragma poison foo4 foo5
|
||||
foo4
|
||||
foo5
|
||||
#pragma poison +++
|
||||
#define foo6 123
|
||||
#pragma poison foo6
|
||||
#define foo6 345
|
||||
#define foo6 456
|
||||
#ifdef foo6
|
||||
#error hey! foo6 poisoned!
|
||||
#endif
|
||||
#if defined(foo6)
|
||||
#error no, foo6 still poisoned!
|
||||
#else
|
||||
foo6
|
||||
#endif
|
||||
#pragma poison
|
|
@ -7,6 +7,7 @@
|
|||
/* The line number below must be just a few lines greater than the
|
||||
actual line number. */
|
||||
#line 10 "baz"
|
||||
wibble
|
||||
|
||||
/*
|
||||
{ dg-final { if \{ [grep cpp-li1.i baz] != "" \} \{ } }
|
||||
|
|
22
gcc/testsuite/gcc.dg/poison-1.c
Normal file
22
gcc/testsuite/gcc.dg/poison-1.c
Normal file
|
@ -0,0 +1,22 @@
|
|||
#pragma poison foo
|
||||
foo /* { dg-error "foo" "use of foo" } */
|
||||
#pragma poison foo2 foo3
|
||||
foo2 /* { dg-error "foo2" "use of foo2" } */
|
||||
foo3 /* { dg-error "foo3" "use of foo3" } */
|
||||
#pragma poison foo4 foo5
|
||||
foo4 /* { dg-error "foo4" "use of foo4" } */
|
||||
foo5 /* { dg-error "foo5" "use of foo5" } */
|
||||
#pragma poison +++ /* { dg-error "invalid" "poison non-identifier" } */
|
||||
#define foo6 123
|
||||
#pragma poison foo6 /* { dg-warning "foo6" "poison defined macro" } */
|
||||
#define foo6 345 /* { dg-error "foo6" "def of foo6" } */
|
||||
#define foo6 456 /* { dg-error "foo6" "redef of foo6" } */
|
||||
#ifdef foo6 /* { dg-error "foo6" "#ifdef foo6" } */
|
||||
#error hey! foo6 poisoned!
|
||||
#endif
|
||||
#if defined(foo6) /* { dg-error "foo6" "#if defined foo6" } */
|
||||
#error no, foo6 still poisoned!
|
||||
#else
|
||||
foo6 /* { dg-error "foo6" "use of foo6" } */
|
||||
#endif
|
||||
#pragma poison
|
Loading…
Add table
Reference in a new issue