Quick Contact

โœ‰
fahimkhan20148@gmail.com
๐Ÿ“ฑ
+971 507 286 133
Back to Notes
August 25, 2026
teach/c17glossary

โ† C17 MOC ยท ๐ŸŽฏ Mission ยท ๐Ÿ“š Resources ยท ๐Ÿ“ Teacher Notes

C17 Glossary

[!NOTE] Canonical Language Canonical definitions for ISO C17 concepts, memory rules, compiler behaviors, systems architecture, and vault concept mappings.


Language Semantics & Compiler Behaviors

Undefined Behavior (UB)

Behavior upon use of a non-portable or erroneous construct for which the ISO C standard imposes no requirements; the compiler is free to assume UB never happens and optimize accordingly (which can cause silent miscompilations, crashes, or security vulnerabilities).

Implementation-Defined Behavior

Unspecified behavior where each conforming implementation (compiler + OS target) must document how the choice is made (e.g. size of long, representation of signed negative numbers).

  • Avoid: Undefined behavior, portable choice

Unspecified Behavior

Behavior where the standard provides two or more possibilities and imposes no requirement on which is chosen in any instance (e.g. order of evaluation of function arguments).

  • Avoid: Undefined behavior

Sequence Point

A point in the execution sequence at which all side effects of previous evaluations are complete and no side effects from subsequent evaluations have taken place (in C11/C17 formalized as the "sequenced-before" partial order).

  • Avoid: Execution step, clock tick

Storage Classes, Linkage & Lifetimes

Variable Linkage

The property of an identifier that determines whether it refers to the same object or function across different translation units (external linkage) or only within the current translation unit (internal linkage).

Internal Linkage

Linkage specified by the static keyword at file scope; restricts the identifier's visibility to its own translation unit (.c file), preventing name collisions and enforcing modular encapsulation.

External Linkage

Linkage possessed by default file-scope variables and non-static functions, or explicitly declared with extern; allows identifiers to be referenced across multiple translation units during the linking phase.

Automatic Storage Duration

Storage duration where objects are allocated on the function stack frame upon block entry and automatically deallocated upon block exit (auto storage class).

Static Storage Duration

Storage duration where an object is allocated in the program's data or BSS segment prior to program startup (main()) and persists for the entire program execution lifetime.

Register Storage Class

A storage class specifier (register) hinting to the compiler that an automatic variable should be stored in a CPU register for fast access; in ISO C, applying the address-of operator (&) to a register variable is a compile-time constraint violation.


Memory Model, Structs & Pointer Mechanics

Alignment

A hardware/ABI requirement that an object of a given type be stored at a memory address that is an exact multiple of its size or natural alignment boundary (e.g. a 4-byte uint32_t aligned to a multiple of 4).

Struct Padding and Tail Padding

Unused padding bytes inserted automatically by the compiler between struct members (internal padding) and at the end of a struct (tail padding) to ensure members and contiguous array elements maintain natural alignment boundaries.

Array Decay

The implicit conversion in C where an expression of array type (T[N]) is rewritten by the compiler to a pointer to its first element (T*) in almost all expression contexts (except sizeof, _Alignof, and &).

  • Vault Concept: [[Grill/C Systems Programming#Round 4: Array Decay & sizeof Mechanics|Diagnostic: Array Decay]]
  • Avoid: Pass by reference, array pointer

Strict Aliasing Rule

A compiler optimization rule stating that two pointers of different types (with specific exceptions like char* and uint8_t*) cannot point to the same memory location, allowing the compiler to reorder reads/writes across them.

  • Avoid: Pointer collision, duplicate referencing

Effective Type

The type assigned to an allocated object in memory that governs which pointer types may legitimately read or write to it under strict aliasing rules.

  • Avoid: Variable type, cast type

Type Punning

The practice of accessing a block of memory through a pointer of a different type or through a union to reinterpret its raw bit representation.

  • Avoid: Force casting, byte hacking

Flexible Array Member (FAM)

An unbounded array defined as the last member of a struct (e.g. int data[];), used in C99/C11/C17 to allocate dynamically sized structures in a single contiguous memory block.

  • Avoid: Zero-length array ([0]), trailing pointer

CPU Architecture & Virtual Machine Execution

Endianness & Big-Endian Opcode Packing

The byte ordering of multi-byte numbers in memory. In big-endian systems (such as CHIP-8 opcodes), the most significant byte is stored at the lowest memory address; 16-bit opcodes are reconstructed via (mem[PC] << 8) | mem[PC + 1].

Jump Table

An array of code addresses or function pointers indexed directly by an integer opcode or event type to achieve $O(1)$ instruction dispatch without branch misprediction cascades.

Direct Threaded Code (Computed Gotos)

An interpreter dispatch technique utilizing compiler extensions (such as GNU C &&label and goto *ptr) where every opcode instruction routine handles its own dispatching directly to the next handler, eliminating the central loop switch and reducing CPU branch predictor pipeline stalls.


Diagnostics & Tooling

AddressSanitizer (ASan)

A fast memory error detector tool (enabled via -fsanitize=address) that instruments memory accesses at compile-time to detect out-of-bounds accesses, use-after-free, double-free, and leaks.

UndefinedBehaviorSanitizer (UBSan)

A compile-time instrumentation tool (enabled via -fsanitize=undefined) that catches undefined behaviors at runtime such as signed integer overflow, null pointer dereference, and misaligned pointers.