Syntax Extensions (Using the GNU Compiler Collection (GCC)) (original) (raw)
Next: Extensions to C Semantics, Previous: How to Use Inline Assembly Language in C Code, Up: Extensions to the C Language Family [Contents][Index]
6.12 Other Extensions to C Syntax ¶
GNU C has traditionally supported numerous extensions to standard C syntax. Some of these features were originally intended for compatibility with other compilers or to ease traditional C compatibility, some have been adopted into subsequent versions of the C and/or C++ standards, while others remain specific to GNU C.
- Statements and Declarations in Expressions
- Locally Declared Labels
- Labels as Values
- Nested Functions
- Referring to a Type with typeof
- Support for offsetof
- Determining the Alignment of Functions, Types or Variables
- Extensions to enum Type Declarations
- Support for the _Bool Type
- Macros with a Variable Number of Arguments.
- Conditionals with Omitted Operands
- Case Ranges
- Mixed Declarations, Labels and Code
- C++ Style Comments
- Slightly Looser Rules for Escaped Newlines
- Hex Floats
- Binary Constants using the ‘0b’ Prefix
- Dollar Signs in Identifier Names
- The Character ESC in Constants
- Raw String Literals
- Alternate Keywords
- Function Names as Strings