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
3 Recommendations
Rec. 02. Declarations and Initialization (DCL)
Page Information
Title:
Rec. 02. Declarations and Initialization (DCL)
Author:
Barbara White
Mar 05, 2015
Last Changed by:
David Svoboda
Mar 15, 2022
Tiny Link:
(useful for email)
https://wiki.sei.cmu.edu/confluence/x/XtUxBQ
Export As:
Word
·
PDF
Hierarchy
Parent Page
Page:
3 Recommendations
Children (23)
Page:
DCL00-C. Const-qualify immutable objects
Page:
DCL01-C. Do not reuse variable names in subscopes
Page:
DCL02-C. Use visually distinct identifiers
Page:
DCL03-C. Use a static assertion to test the value of a constant expression
Page:
DCL04-C. Do not declare more than one variable per declaration
Page:
DCL05-C. Use typedefs of non-pointer types only
Page:
DCL06-C. Use meaningful symbolic constants to represent literal values
Page:
DCL07-C. Include the appropriate type information in function declarators
Page:
DCL08-C. Properly encode relationships in constant definitions
Page:
DCL09-C. Declare functions that return errno with a return type of errno_t
Show all...
Page:
DCL10-C. Maintain the contract between the writer and caller of variadic functions
Page:
DCL11-C. Understand the type issues associated with variadic functions
Page:
DCL12-C. Implement abstract data types using opaque types
Page:
DCL13-C. Declare function parameters that are pointers to values not changed by the function as const
Page:
DCL15-C. Declare file-scope objects or functions that do not need external linkage as static
Page:
DCL16-C. Use "L," not "l," to indicate a long value
Page:
DCL17-C. Beware of miscompiled volatile-qualified variables
Page:
DCL18-C. Do not begin integer constants with 0 when specifying a decimal value
Page:
DCL19-C. Minimize the scope of variables and functions
Page:
DCL20-C. Explicitly specify void when a function accepts no arguments
Page:
DCL21-C. Understand the storage of compound literals
Page:
DCL22-C. Use volatile for data that cannot be cached
Page:
DCL23-C. Guarantee that mutually visible identifiers are unique
Hide...
Labels
Global Labels (3)
recommendation-list
dcl
section
Recent Changes
Time
Editor
Mar 15, 2022 09:44
David Svoboda
View Changes
Dec 03, 2018 15:24
Derek Leung
View Changes
Nov 16, 2017 14:40
Will Snavely
View Changes
Nov 16, 2017 14:16
Will Snavely
View Changes
Feb 26, 2017 17:30
Will Snavely
View Page History
Outgoing Links
External Links (5)
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/pages/viewpage.action?p…
https://confluence/label/seccode/recommendation
https://confluence/label/seccode/dcl
SEI CERT C Coding Standard (1)
Home page:
SEI CERT C Coding Standard
Overview
Content Tools
{"serverDuration": 62, "requestCorrelationId": "f2755a7b1ababda8"}