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:
Swasti Shrivastava
Nov 05, 2024
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
Nov 05, 2024 03:03
Swasti Shrivastava
View Changes
Oct 17, 2024 09:36
Caden Milne
View Changes
Updated reference from C11->C23.
Oct 09, 2023 13:49
Jill Britton
View Changes
Apr 20, 2023 05:04
Jill Britton
View Changes
Jul 04, 2022 07:09
Michal Rozenau
Parasoft C/C++test update
View Page History
Outgoing Links
External Links (8)
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://www.mathworks.com/help/bugfinder/ref/certcrulepre31…
https://www.kb.cert.org/vulnotes/bymetric?searchview&query=…
SEI CERT C Coding Standard (35)
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:
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:
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": 95, "requestCorrelationId": "41a9704f60a61630"}