]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/c2x-nullptr-6.c
24e14fa6921057b39fe3d7f985289a316f5d84e8
2 /* { dg-options "-std=c2x" } */
6 int : nullptr; /* { dg-error "not an integer constant" } */
9 enum E
{ X
= nullptr }; /* { dg-error "not an integer constant" } */
11 alignas(nullptr) int g
; /* { dg-error "not an integer constant" } */
13 int arr
[10] = { [nullptr] = 1 }; /* { dg-error "not of integer type" } */
15 _Static_assert (nullptr, "nullptr"); /* { dg-error "not an integer" } */
20 case nullptr: /* { dg-error "an integer constant" } */
25 case 1 ... nullptr: /* { dg-error "an integer constant" } */
30 case nullptr ... 2: /* { dg-error "an integer constant" } */