Cheat sheets

PCC-06Cheat sheet1 pageIn a paid pack

Sequencing, Side Effects and Short-Circuit

Side effects and the C11 sequencing relations (sequenced before, unsequenced, indeterminately sequenced), the points where evaluation is ordered, a decision flow that classifies an expression as defined, unspecified or undefined, classic undefined expressions such as i = i++ and printf with i and i++, unspecified call order, short-circuit evaluation of && and || with skipped increments, the conditional and comma operators, and commas that are not operators.

PCC-07Cheat sheet1 pageIn a paid pack

Defined, Unspecified and Undefined Behaviour

The four behaviour categories of the C standard with definitions and catalogues of examples, constraint violations that the compiler must diagnose (and gcc rejects), compiler extensions, how to test for signed overflow before it happens, and a routine for answering GATE options when a program is undefined, unspecified or depends on the platform. Every compile error listed is checked by the build.