clang/test/C/C23/n2549.c
raw| 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 |