llvm-project/clang/test/Sema/large-bit-int.c
Freddy Ye def720726b [X86][clang] Lift _BitInt() supported max width.
Reviewed By: mgehre-amd

Differential Revision: https://reviews.llvm.org/D139170
2022-12-06 11:02:27 +08:00

12 lines
492 B
C

// RUN: %clang_cc1 -triple aarch64-unknown-unknown -fexperimental-max-bitint-width=1024 -fsyntax-only -verify %s
void f() {
_Static_assert(__BITINT_MAXWIDTH__ == 1024, "Macro value is unexpected.");
_BitInt(1024) a;
unsigned _BitInt(1024) b;
_BitInt(8388609) c; // expected-error {{signed _BitInt of bit sizes greater than 1024 not supported}}
unsigned _BitInt(0xFFFFFFFFFF) d; // expected-error {{unsigned _BitInt of bit sizes greater than 1024 not supported}}
}