Clang Project

clang_source_code/test/Headers/stdint-typeof-MINMAX.cpp
1// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=aarch64-none-none
2// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=arm-none-none
3// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=i386-none-none
4// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=mips-none-none
5// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=mips64-none-none
6// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=msp430-none-none
7// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=powerpc64-none-none
8// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=powerpc64-none-netbsd
9// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=powerpc-none-none
10// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=s390x-none-none
11// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=sparc-none-none
12// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=tce-none-none
13// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=x86_64-none-none
14// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=x86_64-pc-linux-gnu
15// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=i386-mingw32
16// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=xcore-none-none
17// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only
18
19#include <stdint.h>
20#include <stddef.h>
21
22static_assert(__is_same(__typeof__(INTPTR_MIN), intptr_t));
23static_assert(__is_same(__typeof__(INTPTR_MAX), intptr_t));
24static_assert(__is_same(__typeof__(UINTPTR_MAX), uintptr_t));
25static_assert(__is_same(__typeof__(PTRDIFF_MIN), ptrdiff_t));
26static_assert(__is_same(__typeof__(PTRDIFF_MAX), ptrdiff_t));
27static_assert(__is_same(__typeof__(SIZE_MAX), size_t));
28static_assert(__is_same(__typeof__(INTMAX_MIN), intmax_t));
29static_assert(__is_same(__typeof__(INTMAX_MAX), intmax_t));
30static_assert(__is_same(__typeof__(UINTMAX_MAX), uintmax_t));
31static_assert(__is_same(__typeof__(INTMAX_C(5)), intmax_t));
32static_assert(__is_same(__typeof__(UINTMAX_C(5)), uintmax_t));
33