CertC-DCL

Declarations and Initialization

Nested Rules

CertC-DCL00

Const-qualify immutable objects

CertC-DCL01

Do not reuse variable names in subscopes

CertC-DCL02

Use visually distinct identifiers

CertC-DCL03

Use a static assertion to test the value of a constant expression

CertC-DCL04

Do not declare more than one variable per declaration

CertC-DCL05

Use typedefs of non-pointer types only

CertC-DCL06

Use meaningful symbolic constants to represent literal values

CertC-DCL07

Include the appropriate type information in function declarators

CertC-DCL09

Declare functions that return errno with a return type of errno_t

CertC-DCL11

Understand the type issues associated with variadic functions

CertC-DCL12

Implement abstract data types using opaque types

CertC-DCL13

Declare function parameters that are pointers to values not changed by the function as const

CertC-DCL15

Declare file-scope objects or functions that do not need external linkage as static

CertC-DCL16

Use “L,” not “l,” to indicate a long value

CertC-DCL18

Do not begin integer constants with 0 when specifying a decimal value

CertC-DCL19

Minimize the scope of variables and functions

CertC-DCL20

Explicitly specify void when a function accepts no arguments

CertC-DCL21

Understand the storage of compound literals

CertC-DCL23

Guarantee that mutually visible identifiers are unique

CertC-DCL30

Declare objects with appropriate storage durations

CertC-DCL31

Declare identifiers before using them

CertC-DCL36

Do not declare an identifier with conflicting linkage classifications

CertC-DCL37

Do not declare or define a reserved identifier

CertC-DCL38

Use the correct syntax when declaring a flexible array member

CertC-DCL39

Avoid information leakage when passing a structure across a trust boundary

CertC-DCL40

Do not create incompatible declarations of the same function or object

CertC-DCL41

Do not declare variables inside a switch statement before the first case label

Options