* gcc.dg/inline-23.c: Use pointer sized type for cast from pointer.
authorRask Ingemann Lambertsen <rask@sygehus.dk>
Sat, 21 Jul 2007 09:30:24 +0000 (11:30 +0200)
committerRask Ingemann Lambertsen <rask@gcc.gnu.org>
Sat, 21 Jul 2007 09:30:24 +0000 (09:30 +0000)
From-SVN: r126809

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/inline-23.c

index 87dff78301979e2dd575dc58bba235d7cc0a12e7..2f83a2aeb2ff75293397b78285f3725fad18eba7 100644 (file)
@@ -1,3 +1,7 @@
+2007-07-21  Rask Ingemann Lambertsen  <rask@sygehus.dk>
+
+       * gcc.dg/inline-23.c: Use pointer sized type for cast from pointer.
+
 2007-07-20  Richard Sandiford  <richard@codesourcery.com>
 
        * gcc.target/mips/mips.exp (is_gp32_flag): Return true for -msmartmips.
index 171cf624a19e9f8a2851cc830daa9efe94670ecb..55bd72a59e66013ba160a58c29d5a035c8c069e6 100644 (file)
@@ -2,16 +2,17 @@
 /* { dg-options "-std=gnu89" } */
 /* Make sure we can inline a varargs function whose variable arguments
    are not used.  See PR32493.  */
+#include <stddef.h>
 static inline __attribute__((always_inline)) void __check_printsym_format(const
 char *fmt, ...)
 {
 }
 static inline __attribute__((always_inline)) void print_symbol(const char *fmt,
-unsigned long addr)
+ptrdiff_t addr)
 {
  __check_printsym_format(fmt, "");
 }
 void do_initcalls(void **call)
 {
-   print_symbol(": %s()", (unsigned long) *call);
+   print_symbol(": %s()", (ptrdiff_t) *call);
 }