diff --git a/doc/developer-guides/c_coding_guidelines.rst b/doc/developer-guides/c_coding_guidelines.rst index 3612d6719..a665f9056 100644 --- a/doc/developer-guides/c_coding_guidelines.rst +++ b/doc/developer-guides/c_coding_guidelines.rst @@ -2595,6 +2595,31 @@ Compliant example:: uint32_t test = showcase_u16 + showcase_u32 + showcase_u64; +C-TY-29: "U" suffix shall be used for unsigned integer constants +================================================================ + +For 8-bit, 16-bit, and 32-bit unsigned integer constants, "U" suffix shall be +used. For 64-bit unsigned integer constants, "UL" suffix shall be used. + +Compliant example:: + + uint8_t showcase_u8 = 8U; + uint16_t showcase_u16 = 16U; + uint32_t showcase_u32 = 32U; + + uint64_t showcase_u64 = 64UL; + +.. rst-class:: non-compliant-code + + Non-compliant example:: + + uint8_t showcase_u8 = 8; + uint16_t showcase_u16 = 16; + uint32_t showcase_u32 = 32; + + uint64_t showcase_u64 = 64; + + Identifiers *********** @@ -3240,8 +3265,8 @@ function: block shall start with :literal:`\ *` (space-asterisk). It also applies to the line which is used to separate different paragraphs. We'll call it a blank line for simplicity. -4) For each function, the information shall be documented with the following - order: brief description, detailed description, parameters description, +4) For each function, following information shall be documented: + brief description, detailed description, parameters description, pre-conditions, post-conditions, return value description, and comments explaining the actual return values. We'll call each block of information a paragraph for simplicity. A paragraph may be removed from the list if it is not