diff options
author | Andreas Jaeger <aj@suse.de> | 2003-11-12 12:19:10 +0100 |
---|---|---|
committer | Andreas Jaeger <aj@gcc.gnu.org> | 2003-11-12 12:19:10 +0100 |
commit | 7671789c9cccdfc8e6daef2a96f615a567b59980 (patch) | |
tree | 45abbef285c1b023b58b90652e9aa4331b66158e /gcc/testsuite/gcc.dg/c99-const-expr-2.c | |
parent | f95bd8e287fd839147c6fe2df6ac87cc9a19bc7e (diff) | |
download | gcc-7671789c9cccdfc8e6daef2a96f615a567b59980.zip gcc-7671789c9cccdfc8e6daef2a96f615a567b59980.tar.gz gcc-7671789c9cccdfc8e6daef2a96f615a567b59980.tar.bz2 |
c99-const-expr-2.c (foo): Avoid extra warning on 64-bit systems.
* gcc.dg/c99-const-expr-2.c (foo): Avoid extra warning on 64-bit
systems.
Co-Authored-By: Andrew Pinski <pinskia@physics.uc.edu>
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
Co-Authored-By: Richard Henderson <rth@redhat.com>
From-SVN: r73490
Diffstat (limited to 'gcc/testsuite/gcc.dg/c99-const-expr-2.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/c99-const-expr-2.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/testsuite/gcc.dg/c99-const-expr-2.c b/gcc/testsuite/gcc.dg/c99-const-expr-2.c index 1ba1b4a..1a457e51 100644 --- a/gcc/testsuite/gcc.dg/c99-const-expr-2.c +++ b/gcc/testsuite/gcc.dg/c99-const-expr-2.c @@ -14,6 +14,12 @@ int *a; int b; long *c; +#ifdef _LP64 +#define ZERO 0L +#else +#define ZERO 0 +#endif + /* Assertion that n is a null pointer constant: so the conditional expression has type 'int *' instead of 'void *'. */ @@ -30,7 +36,7 @@ foo (void) ASSERT_NPC ((void *)0); 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" } */ + ASSERT_NOT_NPC ((void *)(0, ZERO)); /* { dg-bogus "incompatible" "bogus null pointer constant" } */ 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))); |