
Mark Functions That Never Return With the noreturn Attribute
Declare a function that calls exit or abort as noreturn so GCC drops dead code, silences false warnings and lays out the error path correctly.
Tag
445 posts

Declare a function that calls exit or abort as noreturn so GCC drops dead code, silences false warnings and lays out the error path correctly.

Build a C program with gcc -g, start it under GDB, stop at main, run it to the end and quit cleanly. The smallest complete session, with every output shown.

Pick up a recompiled load module in a running CICS region with CEMT SET PROGRAM NEWCOPY or PHASEIN, and learn why the old copy sometimes stays.

Put code, constants, variables and zeroed buffers into the right ELF sections in NASM and GNU as, and see how segments and permissions follow from them.

A process is a running program plus the kernel's record of it: a PID, a private address space and a table entry. See each part in C on Linux.

Sleeping means the scheduler switches tasks, and an interrupt handler has no task to switch away from. See the reasons, the error message and the fixes.

Detect controllers, read buttons, sticks and triggers with the SDL 3.2 gamepad API in C, apply dead zones, handle hot-plugging and add rumble.

An ISA is the contract between software and a processor: instructions, registers, encodings. See one add function as x86-64, AArch64 and RISC-V code and bytes.

Learn what the GStreamer base, good, bad, ugly and libav plugin sets contain, how to install them on Linux, and how to map a missing element to its package.

Name threads with pthread_setname_np so gdb, top -H and /proc show readable names. Covers the 15-character limit, ERANGE, prctl and C++ and Rust.

Learn the difference between = and := in GNU Make, when ?= and += fit, and how a recursive variable can silently run a shell command many times.

Run EXEC CICS commands one at a time from a 3270 screen with CECI, read the response and EIBRESP values, check syntax with CECS and know the production limits.