Skip to main content
assistive.skiplink.to.breadcrumbs
assistive.skiplink.to.header.menu
assistive.skiplink.to.action.menu
assistive.skiplink.to.quick.search
Log in
Confluence
Spaces
Hit enter to search
Help
Online Help
Keyboard Shortcuts
Feed Builder
What’s new
Available Gadgets
About Confluence
Log in
SEI CERT C Coding Standard
Pages
Boards
Space shortcuts
Dashboard
Secure Coding Home
Android
C
C++
Java
Perl
Page tree
Browse pages
Configure
Space tools
View Page
A
t
tachments (0)
Page History
Page Information
View in Hierarchy
View Source
Export to PDF
Export to Word
Pages
…
SEI CERT C Coding Standard
2 Rules
Rule 01. Preprocessor (PRE)
PRE31-C. Avoid side effects in arguments to unsafe macros
Page Information
Title:
PRE31-C. Avoid side effects in arguments to unsafe macros
Author:
Robert Seacord
Sep 28, 2007
Last Changed by:
Francesco Mariani
Aug 31, 2025
Tiny Link:
(useful for email)
https://wiki.sei.cmu.edu/confluence/x/I9YxBQ
Export As:
Word
·
PDF
Incoming Links
SEI CERT C++ Coding Standard (1)
Page:
EXP52-CPP. Do not rely on side effects in unevaluated operands
SEI CERT C Coding Standard (4)
Page:
EXP44-C. Do not rely on side effects in operands to sizeof, _Alignof, or _Generic
Page:
PRE12-C. Do not define unsafe macros
Page:
PRE00-C. Prefer inline or static functions to function-like macros
Page:
FIO41-C. Do not call getc(), putc(), getwc(), or putwc() with a stream argument that has side effects
Hierarchy
Parent Page
Page:
Rule 01. Preprocessor (PRE)
Labels
Global Labels (8)
sample
rose-na-macros
android-applicable
exceptions
ptc
rule
pre
in-cpp
Recent Changes
Time
Editor
Aug 31, 2025 04:52
Francesco Mariani
View Changes
Aug 06, 2025 17:45
David Svoboda
View Changes
REM cost reform
May 06, 2025 10:42
David Svoboda
View Changes
May 05, 2025 08:03
David Svoboda
View Changes
May 05, 2025 08:02
David Svoboda
REM Cost Reform
View Page History
Outgoing Links
External Links (9)
https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html
gcc.gnu.org/onlinedocs/gcc/Typeof.html
https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
https://wiki.sei.cmu.edu/confluence/display/c/How+this+Codi…
https://wiki.sei.cmu.edu/confluence/display/c/BB.+Definitio…
https://www.mathworks.com/help/bugfinder/ref/certcrulepre31…
https://www.kb.cert.org/vulnotes/bymetric?searchview&query=…
SEI CERT C Coding Standard (37)
Page:
Coverity
Page:
INT32-C. Ensure that operations on signed integers do not result in overflow
Page:
Cppcheck Premium
Page:
PC-lint Plus
Page:
Polyspace Bug Finder_V
Page:
Parasoft_V
Page:
PRE12-C. Do not define unsafe macros
Page:
Axivion Bauhaus Suite
Page:
EXP44-C. Do not rely on side effects in operands to sizeof, _Alignof, or _Generic
Page:
MSC14-C. Do not introduce unnecessary platform dependencies
Home page:
SEI CERT C Coding Standard
Page:
Astrée_V
Page:
Polyspace Bug Finder
Page:
Helix QAC
Page:
PC-lint Plus_V
Page:
LDRA_V
Page:
CodeSonar
Page:
ECLAIR
Page:
Axivion Bauhaus Suite_V
Page:
AA. Bibliography
Page:
LDRA
Page:
Security Reviewer - Static Reviewer_V
Page:
Klocwork
Page:
Astrée
Page:
CodeSonar_V
Page:
RuleChecker
Page:
MSC11-C. Incorporate diagnostic tests using assertions
Page:
Cppcheck Premium_V
Page:
Coverity_V
Page:
Parasoft
Page:
BB. Definitions
Page:
Klocwork_V
Page:
Security Reviewer - Static Reviewer
Page:
PRE00-C. Prefer inline or static functions to function-like macros
Page:
ECLAIR_V
Page:
Helix QAC_V
Page:
RuleChecker_V
Overview
Content Tools
{"serverDuration": 121, "requestCorrelationId": "daa88fefabd43309"}