33 lines · cpp
1// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=aarch64-none-none2// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=arm-none-none3// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=i386-none-none4// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=mips-none-none5// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=mips64-none-none6// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=msp430-none-none7// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=powerpc64-none-none8// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=powerpc64-none-netbsd9// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=powerpc-none-none10// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=s390x-none-none11// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=sparc-none-none12// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=tce-none-none13// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=x86_64-none-none14// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=x86_64-pc-linux-gnu15// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=i386-mingw3216// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only -triple=xcore-none-none17// RUN: %clang_cc1 %s -ffreestanding -std=c++1z -fsyntax-only18 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