Spec-Zone.ru › GCC 14

6 Extensions to the C Language Family

GNU C provides several language features not found in ISO standard C. (The -pedantic option directs GCC to print a warning message if any of these features is used.) To test for the availability of these features in conditional compilation, check for a predefined macro __GNUC__, which is always defined under GCC.

These extensions are available in C and Objective-C. Most of them are also available in C++. See Extensions to the C++ Language, for extensions that apply only to C++.

Some features that are in ISO C99 but not C90 or C++ are also, as extensions, accepted by GCC in C90 mode and in C++.

  • Statements and Declarations in Expressions
  • Locally Declared Labels
  • Labels as Values
  • Nested Functions
  • Nonlocal Gotos
  • Constructing Function Calls
  • Referring to a Type with typeof
  • Conditionals with Omitted Operands
  • 128-bit Integers
  • Double-Word Integers
  • Complex Numbers
  • Additional Floating Types
  • Half-Precision Floating Point
  • Decimal Floating Types
  • Hex Floats
  • Fixed-Point Types
  • Named Address Spaces
  • Arrays of Length Zero
  • Structures with No Members
  • Arrays of Variable Length
  • Macros with a Variable Number of Arguments.
  • Slightly Looser Rules for Escaped Newlines
  • Non-Lvalue Arrays May Have Subscripts
  • Arithmetic on void- and Function-Pointers
  • Pointer Arguments in Variadic Functions
  • Pointers to Arrays with Qualifiers Work as Expected
  • Non-Constant Initializers
  • Compound Literals
  • Designated Initializers
  • Case Ranges
  • Cast to a Union Type
  • Mixed Declarations, Labels and Code
  • Declaring Attributes of Functions
  • Specifying Attributes of Variables
  • Specifying Attributes of Types
  • Label Attributes
  • Enumerator Attributes
  • Statement Attributes
  • Attribute Syntax
  • Prototypes and Old-Style Function Definitions
  • C++ Style Comments
  • Dollar Signs in Identifier Names
  • The Character ESC in Constants
  • Determining the Alignment of Functions, Types or Variables
  • An Inline Function is As Fast As a Macro
  • Const and Volatile Functions
  • When is a Volatile Object Accessed?
  • How to Use Inline Assembly Language in C Code
  • Alternate Keywords
  • Incomplete enum Types
  • Function Names as Strings
  • Getting the Return or Frame Address of a Function
  • Stack scrubbing internal interfaces
  • Using Vector Instructions through Built-in Functions
  • Support for offsetof
  • Legacy __sync Built-in Functions for Atomic Memory Access
  • Built-in Functions for Memory Model Aware Atomic Operations
  • Built-in Functions to Perform Arithmetic with Overflow Checking
  • x86-Specific Memory Model Extensions for Transactional Memory
  • Object Size Checking
  • Other Built-in Functions Provided by GCC
  • Built-in Functions Specific to Particular Target Machines
  • Format Checks Specific to Particular Target Machines
  • Pragmas Accepted by GCC
  • Unnamed Structure and Union Fields
  • Thread-Local Storage
  • Binary Constants using the ‘0b’ Prefix

© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-14.4.0/gcc/C-Extensions.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API