diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/intmax_t-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/intmax_t-1.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/intmax_t-1.c b/gcc/testsuite/gcc.dg/intmax_t-1.c new file mode 100644 index 0000000..799d00c --- /dev/null +++ b/gcc/testsuite/gcc.dg/intmax_t-1.c @@ -0,0 +1,24 @@ +/* { dg-do compile } */ +/* { dg-options "-Wall" } */ + +/* 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__; +} |