aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.apple/inttypes-1.c
blob: 40404e2995b796f8aaca923144117e014106a5f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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;
}