aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.apple/inttypes-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.apple/inttypes-1.c')
-rw-r--r--gcc/testsuite/gcc.apple/inttypes-1.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.apple/inttypes-1.c b/gcc/testsuite/gcc.apple/inttypes-1.c
new file mode 100644
index 00000000000..40404e2995b
--- /dev/null
+++ b/gcc/testsuite/gcc.apple/inttypes-1.c
@@ -0,0 +1,21 @@
+/* APPLE LOCAL file test of inttypes.h formatter macros */
+
+/* { dg-do compile } */
+/* { dg-options "-Wall -W" } */
+
+#include <stdio.h>
+#include <inttypes.h>
+#include <stdint.h>
+
+int main ()
+{
+ uint32_t x = 12;
+ int32_t y = 15;
+ printf("x = %" PRIo32 "\n", x);
+ printf("x = %" PRIu32 "\n", x);
+ printf("x = %" PRIx32 "\n", x);
+ printf("x = %" PRIX32 "\n", x);
+ printf("y = %" PRId32 "\n", y);
+ printf("y = %" PRIi32 "\n", y);
+ return 0;
+}