Title: PRE00-C. Prefer inline or static functions to function-like macros  
Author: Robert Seacord May 03, 2008
Last Changed by: Anirban Gangopadhyay Aug 30, 2019
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 (8)
    https://support.roguewave.com/documentation/klocwork/en/cur…
    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 (27)     Page: ECLAIR
    Page: LDRA_V
    Page: PRE01-C. Use parentheses within macros around parameter names
    Page: BB. Definitions
    Page: MEM02-C. Immediately cast the result of a memory allocation function call into a pointer to the allocated type
    Page: RuleChecker
    Page: AA. Bibliography
    Page: Polyspace Bug Finder_V
    Page: Axivion Bauhaus Suite_V
    Page: PRE05-C. Understand macro replacement when concatenating tokens or performing stringification
    Page: PRQA QA-C
    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: PRQA QA-C_v
    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: PRE31-C. Avoid side effects in arguments to unsafe macros
    Page: Astrée
SEI CERT C++ Coding Standard (2)     Page: VOID PRE00-CPP. Avoid defining macros
    Home page: SEI CERT C++ Coding Standard