LabWindows/CVI

Content Type
Programming Language
Current manual

C Language Extensions

C Language Extensions

The LabWindows/CVI compiler has several extensions to the C language. The purpose is to make the LabWindows/CVI compiler compatible with external compilers that use common C extensions.

Note Note  For information about the C language extensions supported in different versions of LabWindows/CVI, visit ni.com/info and enter the following Info Code: CLangExt.

The following table lists the supported Clang and GCC extentions:

Supported
C Extensions GNU89 C99
Alignment Yes Yes
Alternate Keywords: __const__, __asm__, etc., for header files. Yes Yes
Asm Labels: Give a name to variables and functions for __asm__ use (use __asm__ keyword only). Yes Yes
Atomic Builtins: Built-in functions for atomic memory access. Partial: all except __sync_fetch_and_nand and __sync_nand_and_fetch. Partial: all except __sync_fetch_and_nand and __sync_nand_and_fetch.
Attribute Syntax: Formal syntax for attributes. Yes Yes
Attributes on Enumerators Yes Yes
Availability Attribute No No
Binary constants: Binary constants using the 0b prefix. Yes, with warning Yes, with warning
Blocks No No
_Bool data type Yes Yes
Builtin Functions Yes Yes
Builtin Macros Yes Yes
C++ Comments: C++ comments are recognized. Yes Yes
Case Ranges: 'case 1 ... 9' and such. No No
Cast to Union: Casting to union type from any member of the union. Yes, with warning Yes, with warning
Character Escapes: You can use \e as ASCII escape. Yes Yes
Checks for Standard Language Features Partial: (without c_thread_local); query extension using __has_extension. Partial: (without c_thread_local); query extension using __has_extension.
Checks for Type Traits No No
Complex Numbers: Data types for complex numbers. Partial, with warning Partial, with warning
Compound Literals: Give structures, unions or arrays as values. Yes, with warning Yes, with warning
Concatenation of wide and non-wide character strings Yes Yes
Conditionals: Omits the middle operand of a ?: expression. No No
Constant Array Folding: Variable length arrays folded to constant arrays Yes, with warning Yes
Constraints: Constraints for asm operands. Partial: All except 'H', 's', ' ', '?', '!', '&', '%', '#', '*'. Partial: All except 'H', 's', ' ', '?', '!', '&', '%', '#', '*'.
Constructing Calls: Dispatching a call to another function. No No
Decimal Float: Decimal Floating Types. No No
Designated Inits: Labeling elements of initializers. Yes, with warning Yes, with warning
Digraphs and Trigraphs Yes Yes
Dollar Signs: You can use dollar signs in identifiers. Yes Yes
Duplicate type qualifiers Yes Yes
Empty Structures: Structures with no members. Yes, with warning Yes, with warning
Escaped Newlines: Slightly looser rules for escaped newlines. No, with warning No, with warning
Explicit Register Variables - Store a local variable in a register. Yes Yes
Extended Asm: Assembler Instructions with C Expression Operands No No
Extensions for Dynamic Analysis No No
Extensions for Static Analysis Partial: Only __noreturn__. Partial: Only __noreturn__.
Feature Checking Macros Partial: __has_extension not supported. Partial: __has_extension not supported.
Fixed-Point: Fixed-Point Types. No No
Flexible Array: Members at the end of a structure or union. Yes, with warning Yes
Floating Types: Additional Floating Types No No
Format String Checking Yes Yes
Function Attributes: Declaring that functions have no side effects, or that they can never return. Yes Yes
Function Names: Printable strings which are the name of the current function. Yes Yes
Function Overloading in C Yes Yes
Function Prototypes: Prototype declarations and old-style definitions. Yes, with warning Yes, with warning
Hex Floats: Hexadecimal floating-point constants. Yes, with warning Yes
Include File Checking Macros Yes Yes
Incomplete Enums: enum foo;, with details to follow. Yes, with warning Yes, with warning
Initializer lists for complex numbers in C No No
Initializers: Non-constant initializers. Yes Yes
Inline: Defining inline functions (as fast as macros). Yes Yes
Integer Constant Expression Folding: Expressions that are folded to integer constants Yes, with warning Yes, with warning
Labels as Values: Getting pointers to labels, and computed gotos. No No
Local Labels: Labels local to a block. No No
Long Long: Double-word integers, long long int. Yes, with warning Yes
Messages on deprecated and unavailable Attributes Yes Yes
Mixed Declarations: Mixing declarations and code. Yes, with warning Yes
Nested Functions: As in Algol and Pascal, lexical scoping of functions. No No
New limit for #line directive Yes Yes
Non-standard C++11 Attributes No No
Object Size Checking: Built-in functions for limited buffer overflow checking. Yes Yes
Objective-C Features No No
Offsetof: Special syntax for implementing offsetof. Yes Yes
Other Builtins: Other built-in functions. Partial Partial
Pointer Arithmetic: Arithmetic on void-pointers and function pointers. No No
Pragmas: Pragmas accepted by GCC Yes Yes
_Pragma preprocessing operator Yes Yes
Return Address: Getting the return or frame address of a function. Yes Yes
snprintf family of functions Yes Yes
Statement Expressions: Putting statements and declarations inside expressions. No No
Static arrays as function parameters Yes, with warning Yes
Subscripting: Any array can be subscripted, even if not an lvalue. Yes Yes
Target Builtins: Built-in functions specific to particular targets. No No
Target Format Checks: Format checks specific to particular targets. No No
Target-Specific Extensions No No
Thread-Local: Per-thread variables. Yes Yes
Thread-Safety Annotation Checking No No
Trailing comma allowed in enum declaration Yes, with warning Yes
Type Attributes: Specifying attributes of types. Yes Yes
Typeof: typeof, referring to the type of an expression. No No
Type-generic math No No
Type Safety Checking No No
Unnamed Fields: Unnamed struct/union fields within structs/unions. Yes, with warning Yes, with warning
User-Specified System Frameworks No No
Variable Attributes: Specifying attributes of variables. Partial: All except shared and __gcc_struct__. Partial: aligned attribute supported.
Variable Length: Arrays whose length is computed at run time. Yes, with warning Yes, with warning
Variadic Macros: Macros with a variable number of arguments. Yes, with warning Yes
Vector Extensions: Using vector instructions through built-in functions. Yes Yes
Vectors and Extended Vectors Partial Partial
vscanf family of functions Yes Yes
Zero Length: Zero-length arrays. Yes, with warning Yes, with warning
Was this information helpful?