Debian Codegraph @

clang/test/C/C2y/n3457_2.c

raw
1 // RUN: %clang_cc1 -verify=good -std=c2y -finitial-counter-value=2147483648 %s
2 // RUN: %clang_cc1 -verify -std=c2y -finitial-counter-value=2147483648 -DEXPAND_IT %s
3 // good-no-diagnostics
4
5 // This sets the intial __COUNTER__ value to something that's too big. Setting
6 // the value too large is fine. Expanding to a too-large value is not.
7 #ifdef EXPAND_IT
8 // This one should fail.
9 signed long i = __COUNTER__; // expected-error {{'__COUNTER__' value cannot exceed 2'147'483'647}}
10 #endif