Describes programming techniques and practices to help you increase the portability, efficiency and robustness of your C and C++ source code.
It contains the following:
5.1 The compiler as an optimizing compiler.
5.2 Compiler optimization
for code size versus speed.
5.3 Compiler optimization levels and the debug view.
5.4 Selecting the target processor at compile time.
5.5 Enabling NEON and FPU for bare-metal.
5.6 Optimization of loop termination in C code.
5.7 Loop unrolling in C code.
5.8 Compiler optimization and the volatile keyword.
5.9 Code metrics.
5.10 Code metrics for measurement of code size and data size.
5.11 Stack use in C and C++.
5.12 Benefits of reducing debug information in objects and libraries.
5.13 Methods of reducing debug information in objects and libraries.
5.14 Guarding against multiple inclusion of header files.
5.15 Methods of minimizing function parameter passing overhead.
5.16 Returning structures from functions through registers.
5.17 Functions that return the same result when called with the same arguments.
5.18 Comparison of pure and impure functions.
5.19 Recommendation of postfix syntax when qualifying functions with ARM function
5.20 Inline functions.
5.21 Compiler decisions on function inlining.
5.22 Automatic function inlining and static functions.
5.23 Inline functions and removal of unused out-of-line functions at link time.
5.24 Automatic function inlining and multifile compilation.
5.25 Restriction on overriding compiler
decisions about function inlining.
5.26 Compiler modes
and inline functions.
5.27 Inline functions in C++ and C90 mode.
5.28 Inline functions
in C99 mode.
5.29 Inline functions and debugging.
5.30 Types of data alignment.
5.31 Advantages of natural data alignment.
5.32 Compiler storage of data objects by natural byte alignment.
5.33 Relevance of natural data alignment
at compile time.
5.34 Unaligned data access in C and C++ code.
5.35 The __packed qualifier and unaligned data access in C and C++ code.
5.36 Unaligned fields in structures.
penalty associated with marking whole structures as packed.
5.38 Unaligned pointers in C and C++ code.
5.39 Unaligned Load Register (LDR) instructions generated by the compiler.
5.40 Comparisons of an unpacked struct, a __packed struct, and a struct with
individually __packed fields, and of a __packed struct and a #pragma packed
5.41 Compiler support for floating-point arithmetic.
5.42 Default selection
of hardware or software floating-point support.
5.43 Example of hardware and software support differences for floating-point
5.44 Vector Floating-Point (VFP) architectures.
5.45 Limitations on hardware handling of floating-point arithmetic.
5.46 Implementation of Vector Floating-Point (VFP) support code.
5.47 Compiler and library support for half-precision floating-point numbers.
floating-point number format.
5.49 Compiler support for floating-point computations and linkage.
5.50 Types of floating-point linkage.
5.51 Compiler options for floating-point linkage and computations.
5.52 Floating-point linkage and computational requirements of compiler options.
5.53 Processors and their implicit Floating-Point Units (FPUs).
5.54 Integer division-by-zero
errors in C code.
5.55 About trapping integer division-by-zero errors with __aeabi_idiv0().
5.56 About trapping integer division-by-zero errors with __rt_raise().
of integer division-by-zero errors in C code.
5.58 Examining parameters when integer division-by-zero errors occur in C code.
5.59 Software floating-point division-by-zero errors in C code.
5.60 About trapping software floating-point division-by-zero errors.
5.61 Identification of software floating-point division-by-zero errors.
5.62 Software floating-point division-by-zero debugging.
5.63 New language features of C99.
5.64 New library features of C99.
5.65 // comments in C99 and C90.
5.66 Compound literals in C99.
5.67 Designated initializers in C99.
5.68 Hexadecimal floating-point numbers in C99.
5.69 Flexible array members in C99.
5.70 __func__ predefined identifier in C99.
5.71 inline functions in C99.
5.72 long long data type in C99 and C90.
5.73 Macros with a variable number of arguments in C99.
5.74 Mixed declarations and statements in C99.
5.75 New block scopes for selection and iteration statements in C99.
5.76 _Pragma preprocessing operator in C99.
5.77 Restricted pointers in C99.
5.78 Additional <math.h> library functions in C99.
5.79 Complex numbers in C99.
5.80 Boolean type and <stdbool.h> in C99.
5.81 Extended integer types and functions in <inttypes.h> and <stdint.h> in
5.82 <fenv.h> floating-point environment access in C99.
5.83 <stdio.h> snprintf family of functions in C99.
5.84 <tgmath.h> type-generic math macros in C99.
5.85 <wchar.h> wide character I/O functions in C99.
5.86 How to prevent uninitialized data from being initialized to zero.