xref: /llvm-project/clang/test/C/C23/n2549.c (revision 50c81128de8616117118564eff22cf508cba7848)
1 // RUN: %clang_cc1 -verify -std=c23 %s
2 // RUN: %clang_cc1 -verify=pedantic -std=c17 -pedantic %s
3 // RUN: %clang_cc1 -verify=compat -std=c23 -Wpre-c23-compat %s
4 
5 // expected-no-diagnostics
6 
7 /* WG14 N2549: Clang 9
8  * Binary literals
9  */
10 
11 int i = 0b01; /* pedantic-warning {{binary integer literals are a C23 extension}}
12                  compat-warning {{binary integer literals are incompatible with C standards before C23}}
13                */
14 
15