aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/intmax_t-1.c
blob: 80893401c34298d44ec0f39d42a600fda2bf555d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* { dg-do compile } */
/* { dg-options "-Wall" } */
/* { dg-error "" "" { target *-*-solaris2.5.1 *arm*-*-*elf* xscale*-*-elf* xtensa-*-elf* } 0 } */

/* Compile with -Wall to get a warning if built-in and system intmax_t don't
   match.  */

#include <inttypes.h>

__INTMAX_TYPE__ __im_t__;
__UINTMAX_TYPE__ __uim_t__;
intmax_t *im_t_p;
uintmax_t *uim_t_p;

void
imt (void)
{
  im_t_p = &__im_t__;
}

void
uimt (void)
{
  uim_t_p = &__uim_t__;
}