From ab6c59fd76971fe5b02e877ff34e65542b4cd2b7 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 14 Nov 2000 19:34:22 +0000 Subject: [PATCH] c90-const-expr-2.c, [...]: Add more tests. * gcc.dg/c90-const-expr-2.c, gcc.dg/c99-const-expr-2.c: Add more tests. From-SVN: r37466 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/c90-const-expr-2.c | 1 + gcc/testsuite/gcc.dg/c99-const-expr-2.c | 1 + 3 files changed, 7 insertions(+) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ab2666689a4..730bb0da6ec 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2000-11-14 Joseph S. Myers + + * gcc.dg/c90-const-expr-2.c, gcc.dg/c99-const-expr-2.c: Add more + tests. + 2000-11-14 Jakub Jelinek * 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 940a7189795..e69e367dadf 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 03422b61522..00606b6054e 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))); } -- 2.30.2