C

Update: 2022-04-26: Overhauling to be simplier and bsd/clang friendly. Rules of engagement Style The language Basic Types Integer Types Real and Complex Floating Types void Memory Access Operators Strings The Pre Processor Macros Patterns vtables person_s.h print_vtable.h print_vtable.c main.c Libraries C standard library C POSIX library Unit Testing Sample C code Rules of engagement How I program C by Eskil Steenberg Notes on Programming in C by Rob Pike The Ten Commandments for C Programmers by Henry Spencer Style suckless FreeBSD man 9 style The language Basic Types Integer Types C99 with stdbool.
Read more →

Cherished GCC flags

A (work in progress) compilation of useful GCC configuration, focused on C. -W warnings. -Wall is a must. -Werror to treat warnings as errors. -l instructs the linker it has some work to do (i.e. link a library please). -lm is shorthand for -libm and in turn -libm.a is a static library is selected. -L hint to the linker where to locate libraries. -L/opt/gdbm-1.10/src in combination with -lgdbm tells the linker exactly where to find the gdbm libraries.
Read more →