Use __{U,}INTPTR_TYPE__ to avoid including stdint.h
authorSenthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
Wed, 27 Jul 2016 05:22:08 +0000 (05:22 +0000)
committerSenthil Kumar Selvaraj <saaadhu@gcc.gnu.org>
Wed, 27 Jul 2016 05:22:08 +0000 (05:22 +0000)
gcc/testsuite/

* gcc.dg/torture/pr69352.c: Use  __INTPTR_TYPE__ instead of
including stdint.h.
* gcc.dg/torture/pr71866.c: Use __UINTPTR_TYPE__ isntead of
including stdint.h.

From-SVN: r238780

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr69352.c
gcc/testsuite/gcc.dg/torture/pr71866.c

index 0b8b40572b027c8835538dcb5ff85e430193073c..a1b6c56fdeee2dc4f19ba9729b0c393f3e5ce6b3 100644 (file)
@@ -1,3 +1,10 @@
+2016-07-27  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
+
+       * gcc.dg/torture/pr69352.c: Use  __INTPTR_TYPE__ instead of 
+       including stdint.h.
+       * gcc.dg/torture/pr71866.c: Use __UINTPTR_TYPE__ isntead of
+       including stdint.h.
+
 2016-07-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
        PR target/71869
index 12f7f91c2e6a760c333372dd44495542de338267..c111913553dea1ff3526c706db837d5134eb24bb 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 
-#include <stdint.h>
+__extension__ typedef __INTPTR_TYPE__ intptr_t;
 
 int a[10][14], b, c, d, e, f, g, h, i;
 void bar (void);
index 4d71e09f22a456ab6134f90efe78d9697a962c38..b9c1a77660e16c6b805bcd61607575d701947d3b 100644 (file)
@@ -1,7 +1,8 @@
 /* { dg-do compile } */
 /* { dg-additional-options "-ftree-pre -fcode-hoisting" } */
 
-#include <stdint.h>
+__extension__ typedef __UINTPTR_TYPE__ uintptr_t;
+
 typedef unsigned char u8;
 extern unsigned long pci_io_base;
 u8 in_8 (const volatile void *);
@@ -26,7 +27,7 @@ u8 readb (const volatile void * addr)
 static inline
 u8 inb (unsigned long port)
 {
-  return readb((volatile void *)(intptr_t)pci_io_base + port);
+  return readb((volatile void *)(uintptr_t)pci_io_base + port);
 }
 static inline
 void outb (u8 val, unsigned long port)