c99-const-expr-2.c (foo): Avoid extra warning on 64-bit systems.
authorAndreas Jaeger <aj@suse.de>
Wed, 12 Nov 2003 11:19:10 +0000 (12:19 +0100)
committerAndreas Jaeger <aj@gcc.gnu.org>
Wed, 12 Nov 2003 11:19:10 +0000 (12:19 +0100)
* 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

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/c99-const-expr-2.c

index 7bd8ab2736ffed258ccc04d894e10ffcc44e112e..565839337179e6dd540e71638374e0fbb540bbd5 100644 (file)
@@ -5,6 +5,7 @@
 
        * gcc.dg/c90-const-expr-2.c (foo): Avoid extra warning on 64-bit
        systems.
+       * gcc.dg/c99-const-expr-2.c (foo): Likewise.
 
        * gcc.dg/20030926-1.c: Make it work on x86_64 systems.
        * gcc.dg/i386-pentium4-not-mull.c: Likewise.
index 1ba1b4a674a689a318a7d43de51442e58c8e2f2e..1a457e51a7d7f99ad1c539ccf4cadafe6dafdc0d 100644 (file)
@@ -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)));