From 662f340b8118ce91205c91d73729a5f2f7684f80 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 9 Nov 2000 16:01:29 -0800 Subject: [PATCH] sequence-pt-1.c: Cast from pointer to integer via size_t instead of int. * gcc.dg/sequence-pt-1.c: Cast from pointer to integer via size_t instead of int. From-SVN: r37351 --- gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/gcc.dg/sequence-pt-1.c | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e7c7978e09b..6553d1e0c75 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2000-11-09 Richard Henderson + * gcc.dg/sequence-pt-1.c: Cast from pointer to integer + via size_t instead of int. + * gcc.c-torture/execute/string-opt-1.c: Make stub functions static. * gcc.c-torture/execute/string-opt-2.c: Likewise. * gcc.c-torture/execute/string-opt-3.c: Likewise. diff --git a/gcc/testsuite/gcc.dg/sequence-pt-1.c b/gcc/testsuite/gcc.dg/sequence-pt-1.c index 1969781b940..ad4f789435c 100644 --- a/gcc/testsuite/gcc.dg/sequence-pt-1.c +++ b/gcc/testsuite/gcc.dg/sequence-pt-1.c @@ -15,6 +15,8 @@ extern int fnb (int, int); extern int fnc (int *); extern int sprintf (char *, const char *, ...); +typedef __SIZE_TYPE__ size_t; + void foo (int a, int b, int n, int p, int *ptr, struct s *sptr, int *ap, int *bp, int **cp, char *ans) @@ -30,9 +32,9 @@ foo (int a, int b, int n, int p, int *ptr, struct s *sptr, ap[++n] = bp[--n]; /* { dg-warning "undefined" "sequence point warning" } */ cp[n][n] = cp[n][n]++; /* { dg-warning "undefined" "sequence point warning" { xfail *-*-* } } */ cp[n][p] = cp[n][n++]; /* { dg-warning "undefined" "sequence point warning" } */ - *ptr++ = (int)ptr++; /* { dg-warning "undefined" "sequence point warning" } */ + *ptr++ = (size_t)ptr++; /* { dg-warning "undefined" "sequence point warning" } */ sptr->a = sptr->a++; /* { dg-warning "undefined" "sequence point warning" { xfail *-*-* } } */ - sptr->a = (int)(sptr++); /* { dg-warning "undefined" "sequence point warning" } */ + sptr->a = (size_t)(sptr++); /* { dg-warning "undefined" "sequence point warning" } */ *ptr++ = fn (*ptr); /* { dg-warning "undefined" "sequence point warning" } */ a = b = a++; /* { dg-warning "undefined" "sequence point warning" } */ b = a = --b; /* { dg-warning "undefined" "sequence point warning" } */