Liangxu Linux
Liangxu Linux
Nov 4, 2024 · Fundamentals

Unlocking GNU C Extensions: Zero‑Length Arrays, Variable‑Length Arrays, and More

This guide explains key GNU C extensions—including zero‑length and variable‑length arrays, case ranges, statement expressions, typeof, variadic macros, designated initializers, built‑in functions, and attribute syntax—showing how they differ from standard ANSI C and how to use them safely in Linux kernel development.

C extensionsGNU CLinux kernel
0 likes · 10 min read
Unlocking GNU C Extensions: Zero‑Length Arrays, Variable‑Length Arrays, and More
Liangxu Linux
Liangxu Linux
Jul 3, 2021 · Fundamentals

What’s the Hidden Trick Behind This Unusual C Macro in Kernel Code?

The author discovers an unusual macro definition in kernel source that omits the usual parameter list, explains the standard macro usage, shows the original and altered code snippets, and highlights why the macro without arguments works, offering a practical insight for C and embedded developers.

C macrosEmbedded Cc-language
0 likes · 2 min read
What’s the Hidden Trick Behind This Unusual C Macro in Kernel Code?