2000-11-09 Richard Henderson <rth@redhat.com>
+ * 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.
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)
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" } */