From 660a5ac8ec8afb1b609fdfb91df82dca9ed1e187 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Tue, 28 Apr 2009 18:48:34 +0000 Subject: [PATCH] Add some text to the user manual describing the current state of C support in clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70314 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/UsersManual.html | 132 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 126 insertions(+), 6 deletions(-) diff --git a/docs/UsersManual.html b/docs/UsersManual.html index 4167f6183f..934e6843b6 100644 --- a/docs/UsersManual.html +++ b/docs/UsersManual.html @@ -38,10 +38,11 @@ td {
  • C Language Features
  • Objective-C Language Features @@ -482,15 +483,134 @@ and not specified on the command line using -include.

    C Language Features

    +

    The support for standard C in clang is feature-complete except for the C99 +floating-point pragmas.

    -

    Intentional Incompatibilities with GCC

    +

    Extensions supported by clang

    + + +

    See clang language extensions.

    + +

    Differences between various standard modes

    + + +

    clang supports the -std option, which changes what language mode clang uses. +The supported modes for C are c89, gnu89, c94, c99, gnu99 and various aliases +for those modes. If no -std option is specified, clang defaults to gnu99 mode. +

    -

    No VLAs in structs.

    +

    Differences between all c* and gnu* modes:

    + +

    Differences between *89 and *99 modes:

    + +

    c94 mode is identical to c89 mode except that digraphs are enabled in +c94 mode (FIXME: And __STDC_VERSION__ should be defined!).

    + + +

    GCC extensions not implemented yet

    + + +

    clang tries to be compatible with gcc as much as possible, but some gcc +extensions are not implemented yet:

    + + + +

    This is not a complete list; if you find an unsupported extension +missing from this list, please send an e-mail to cfe-dev. This list +currently excludes C++; see C++ Language Features. +Also, this list does not include bugs in mostly-implemented features; please +see the +bug tracker for known existing bugs (FIXME: Is there a section for +bug-reporting guidelines somewhere?).

    + + +

    Intentionally unsupported GCC extensions

    + + +

    clang does not support the gcc extension that allows variable-length arrays +in structures. This is for a few of reasons: one, it is tricky +to implement, two, the extension is completely undocumented, and three, the +extension appears to be very rarely used.

    + + +

    Microsoft extensions

    + +

    clang has some experimental support for extensions from +Microsoft Visual C++; to enable it, use the -fms-extensions command-line +option. Eventually, this will be the default for Windows targets. +These extensions are not anywhere near complete, so please do not +file bugs; patches are welcome, though.

    Objective-C Language Features

    -- 2.40.0