summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/c99-const-expr-2.c
diff options
context:
space:
mode:
authoraj <aj@138bc75d-0d04-0410-961f-82ee72b054a4>2003-11-12 11:19:10 +0000
committeraj <aj@138bc75d-0d04-0410-961f-82ee72b054a4>2003-11-12 11:19:10 +0000
commit1d519adc017e33233038947cefdd3dec2740fc09 (patch)
tree45abbef285c1b023b58b90652e9aa4331b66158e /gcc/testsuite/gcc.dg/c99-const-expr-2.c
parentfb98e0e4f367915be8411670cf07908ad1fd5e1d (diff)
downloadgcc-1d519adc017e33233038947cefdd3dec2740fc09.tar.gz
* gcc.dg/c99-const-expr-2.c (foo): Avoid extra warning on 64-bit
systems. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73490 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/c99-const-expr-2.c')
-rw-r--r--gcc/testsuite/gcc.dg/c99-const-expr-2.c8
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 1ba1b4a674a..1a457e51a7d 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)));