Title: PRE00-C. Prefer inline or static functions to function-like macros  
Author: Robert Seacord May 03, 2008
Last Changed by: Alexander Wagner May 15, 2023
Tiny Link: (useful for email) https://wiki.sei.cmu.edu/confluence/x/INcxBQ
Export As: Word · PDF  
Hierarchy
Parent Page
    Page: Rec. 01. Preprocessor (PRE)
Outgoing Links
External Links (7)
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/display/c/Polyspace+Bug…
    https://www.mathworks.com/help/bugfinder/ref/certcrec.pre00…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    gcc.gnu.org/onlinedocs/gcc/Inline.html
    https://www.kb.cert.org/vulnotes/bymetric?searchview&qu…
    https://www.sonarsource.com/products/codeanalyzers/sonarcfa…
SEI CERT C Coding Standard (31)     Page: ECLAIR
    Page: LDRA_V
    Page: PRE01-C. Use parentheses within macros around parameter names
    Page: BB. Definitions
    Page: Helix QAC_V
    Page: MEM02-C. Immediately cast the result of a memory allocation function call into a pointer to the allocated type
    Page: CodeSonar
    Page: RuleChecker
    Page: AA. Bibliography
    Page: Polyspace Bug Finder_V
    Page: Axivion Bauhaus Suite_V
    Page: PC-lint Plus_V
    Page: Helix QAC
    Page: PRE05-C. Understand macro replacement when concatenating tokens or performing stringification
    Home page: SEI CERT C Coding Standard
    Page: Axivion Bauhaus Suite
    Page: Astrée_V
    Page: PRE02-C. Macro replacement lists should be parenthesized
    Page: EXP30-C. Do not depend on the order of evaluation for side effects
    Page: LDRA
    Page: DCL01-C. Do not reuse variable names in subscopes
    Page: Klocwork_V
    Page: Parasoft_V
    Page: Parasoft
    Page: ECLAIR_V
    Page: Klocwork
    Page: RuleChecker_V
    Page: PC-lint Plus
    Page: PRE31-C. Avoid side effects in arguments to unsafe macros
    Page: Astrée
    Page: CodeSonar_V
SEI CERT C++ Coding Standard (2)     Page: VOID PRE00-CPP. Avoid defining macros
    Home page: SEI CERT C++ Coding Standard