C Support in Clang
+ + +Clang implements the following published and upcoming ISO C standards:
+ +| Language Standard | +Flag | +Available in Clang? | +
|---|---|---|
| C89 | +-std=c89 | +Yes | +
| C99 | +-std=c99 | +Almost certainly | +
| C11 | +-std=c11 | +Probably | +
| C17 | +-std=c17 | +Maybe? | +
| C2x | +-std=c2x | +Partial | +
The Clang community is continually striving to improve C standards +compliance between releases. We implement the resolution for defect +reports, but we do not currently track our DR status (help with +tracking DR status is appreciated).
+ +The LLVM bug tracker contains a +Clang C component that tracks known bugs with Clang's language +conformance.
+ +C89 implementation status
+ + + +C99 implementation status
+ + + +C11 implementation status
+ + + +C17 implementation status
+ + + +C2x implementation status
+ + + +You can use Clang in C2x mode with the -std=c2x option.
+
+
+
+
+List of features and minimum Clang version with support
+ +| Language Feature | +C2x Proposal | +Available in Clang? | +
|---|---|---|
| Evaluation formats | +N2186 | +Unknown | +
| Clarifying the restrict Keyword v2 | +N2660 | +Unknown | +
| Harmonizing static_assert with C++ | +N2665 | +Clang 9 | +
| nodiscard attribute | +N2667 | +Clang 9 | +
| maybe_unused attribute | +N2670 | +Clang 9 | +
| TS 18661 Integration | +||
| N2314 | +Unknown | +|
| N2341 | +Unknown | +|
| N2401 | +Unknown | +|
| N2359 | +Unknown | +|
| N2546 | +Unknown | +|
| Preprocessor line numbers unspecified | +N2322 | +Yes | +
| deprecated attribute | +N2334 | +Clang 9 | +
| Attributes | +||
| N2335 | +Clang 9 | +|
| N2554 | +Clang 9 | +|
| Defining new types in offsetof | +N2350 | +Yes | +
| fallthrough attribute | +N2408 | +Clang 9 | +
| Two's complement sign representation | +N2412 | +Unknown | +
| Adding the u8 character prefix | +N2418 | +No | +
| Remove support for function definitions with identifier lists | +N2432 | +No | +
| *_IS_IEC_60559 feature test macros | +N2379 | +Unknown | +
| Floating-point negation and conversion | +N2416 | +Unknown | +
| Annex F.8 update for implementation extensions and rounding | +N2384 | +Unknown | +
| _Bool definitions for true and false | +N2393 | +No | +
| [[nodiscard("should have a reason")]] | +N2448 | +Clang 10 | +
| Allowing unnamed parameters in function definitions | +N2480 | +Clang 11 | +
| Free positioning of labels inside compound statements | +N2508 | +No | +
| Clarification request for C17 example of undefined behavior | +N2517 | +No | +
| Querying attribute support | +N2553 | +Clang 9 | +
| Binary literals | +N2549 | +Clang 9 | +
| Allow duplicate attributes | +N2557 | +Clang 13 | +
| Character encoding of diagnostic text | +N2563 | +Yes | +
| What we think we reserve | +N2572 | +Yes | +
| Decimal floating-point triples | +N2580 | +Unknown | +
| Remove mixed wide string literal concatenation | +N2594 | +Clang 9 | +
| Update to IEC 60559:2020 | +N2600 | +Unknown | +
| Compatibility of Pointers to Arrays with Qualifiers | +N2607 | +Unknown | +