diff options
| -rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/testsuite/gcc.dg/c90-const-expr-2.c | 1 | ||||
| -rw-r--r-- | gcc/testsuite/gcc.dg/c99-const-expr-2.c | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ab26666..730bb0d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2000-11-14 Joseph S. Myers <jsm28@cam.ac.uk> + + * gcc.dg/c90-const-expr-2.c, gcc.dg/c99-const-expr-2.c: Add more + tests. + 2000-11-14 Jakub Jelinek <jakub@redhat.com> * gcc.c-torture/execute/20000801-4.c: Make sure the second string is diff --git a/gcc/testsuite/gcc.dg/c90-const-expr-2.c b/gcc/testsuite/gcc.dg/c90-const-expr-2.c index 940a718..e69e367 100644 --- a/gcc/testsuite/gcc.dg/c90-const-expr-2.c +++ b/gcc/testsuite/gcc.dg/c90-const-expr-2.c @@ -31,6 +31,7 @@ foo (void) ASSERT_NOT_NPC ((void *)(void *)0); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */ ASSERT_NOT_NPC ((void *)(char *)0); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */ ASSERT_NOT_NPC ((void *)(0, 0)); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */ + ASSERT_NOT_NPC ((void *)(&"Foobar"[0] - &"Foobar"[0])); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */ /* This last one is a null pointer constant in C99 only. */ ASSERT_NOT_NPC ((void *)(1 ? 0 : (0, 0))); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */ } diff --git a/gcc/testsuite/gcc.dg/c99-const-expr-2.c b/gcc/testsuite/gcc.dg/c99-const-expr-2.c index 03422b6..00606b6 100644 --- a/gcc/testsuite/gcc.dg/c99-const-expr-2.c +++ b/gcc/testsuite/gcc.dg/c99-const-expr-2.c @@ -31,6 +31,7 @@ foo (void) ASSERT_NOT_NPC ((void *)(void *)0); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */ ASSERT_NOT_NPC ((void *)(char *)0); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */ ASSERT_NOT_NPC ((void *)(0, 0)); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */ + ASSERT_NOT_NPC ((void *)(&"Foobar"[0] - &"Foobar"[0])); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */ /* This last one is a null pointer constant in C99 only. */ ASSERT_NPC ((void *)(1 ? 0 : (0, 0))); } |
