14 lines · c
1// RUN: %clang_cc1 -triple x86_64 -verify -std=c2x %s2 3/* WG14 N2838: yes4 * Types and sizes5 */6 7char buffer4[0xFFFF'FFFF'FFFF'FFFF'1wb]; /* expected-error {{array is too large (295'147'905'179'352'825'841 elements)}} */8char buffer3[0xFFFF'FFFF'FFFF'FFFFwb]; /* expected-error {{array is too large (18'446'744'073'709'551'615 elements)}} */9char buffer2[0x7FFF'FFFF'FFFF'FFFFwb]; /* expected-error {{array is too large (9'223'372'036'854'775'807 elements)}} */10char buffer1[0x1FFF'FFFF'FFFF'FFFFwb]; /* array is juuuuuust right */11 12/* The largest object we can create is still smaller than SIZE_MAX. */13static_assert(0x1FFF'FFFF'FFFF'FFFFwb <= __SIZE_MAX__);14