Start here

Home
About Klocwork
What's new
Fixed issues
Release notes
Installation

Reference

C/C++ checkers
Java checkers
C# checkers
MISRA C 2004 checkers
MISRA C++ 2008 checkers
MISRA C 2012 checkers
MISRA C 2012 checkers with Amendment 1
Commands
Metrics
Troubleshooting
Reference

Product components

C/C++ Integration build analysis
Java Integration build analysis
Desktop analysis
Refactoring
Klocwork Static Code Analysis
Klocwork Code Review
Structure101
Tuning
Custom checkers

Coding environments

Visual Studio
Eclipse for C/C++
Eclipse for Java
IntelliJ IDEA
Other

Administration

Project configuration
Build configuration
Administration
Analysis performance
Server performance
Security/permissions
Licensing
Klocwork Static Code Analysis Web API
Klocwork Code Review Web API

Community

View help online
Visit RogueWave.com
Klocwork Support
Rogue Wave Videos

Legal

Legal information

MISRA.LITERAL.SUFFIX.CASE

Literal suffix in lower case.

MISRA-C++ Rule 2-3-14 (required): Literal suffixes shall be upper case.

Rationale

Using upper case literal suffixes removes the potential ambiguity between "1" (digit 1) and "l" (letter el) for declaring literals.

Example

const uint32_t   a = 0U;
const uint32_t   b = 0u;       // Non-compliant
const int64_t    c = 0L;
const int64_t    d = 0l;       // Non-compliant
const uint64_t   e = 0UL;
const uint64_t   f = 0Ul;      // Non-compliant
const uint32_t   g = 0x12bU;
const uint32_t   h = 0x12bu;   // Non-compliant
const float32_t  m = 1.2F;
const float32_t  n = 2.4f;     // Non-compliant
const float128_t p = 1.2L;
const float128_t n = 2.4l;     // Non-compliant