C Language Extensions

LabWindows/CVI 2017 Help

Edition Date: May 2017

Part Number: 370051AG-01

»View Product Info

DOWNLOAD (Windows Only)
LabWindows/CVI 2010 Help
LabWindows/CVI 2012 Help
LabWindows/CVI 2013 Help
LabWindows/CVI 2015 Help
LabWindows/CVI 2017 Help

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:

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

 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 

WAS THIS ARTICLE HELPFUL?

Not Helpful