FK_OPS, FK_NONE, modeFlag,
"realcompare",
FLG_REALCOMPARE,
- "dangerous comparison between reals (dangerous because of inexact "
+ "dangerous equality comparison between reals (dangerous because of inexact "
"floating point representations)",
"Two real (float, double, or long double) values are compared "
- "directly using a C primitive. "
+ "directly using == or != primitive. "
+ "This may produce unexpected results since floating point "
+ "representations are inexact. Instead, compare the difference to "
+ "FLT_EPSILON or DBL_EPSILON.",
+ 0, 0,
+ },
+ {
+ FK_OPS, FK_NONE, modeFlag,
+ "realrelatecompare",
+ FLG_REALRELATECOMPARE,
+ "possibly dangerous relational comparison between reals (dangerous because of inexact "
+ "floating point representations)",
+ "Two real (float, double, or long double) values are compared "
+ "directly using < or >. "
"This may produce unexpected results since floating point "
"representations are inexact. Instead, compare the difference to "
"FLT_EPSILON or DBL_EPSILON.",
"casebreak",
FLG_CASEBREAK,
"non-empty case in a switch without preceding break",
- "Execution falls through from the previous case.", 0, 0
+ "Execution falls through from the previous case (use /*@fallthrough@*/ to mark fallthrough cases).", 0, 0
},
{
FK_CONTROL, FK_NONE, modeFlag,
0, 0
},
+ {
+ FK_MACROS, FK_PROTOS, plainFlag,
+ "macroconstdistance",
+ FLG_MACROCONSTDIST,
+ "macro constant name does not match nearby name",
+ "Macro constant name does matches name of a previous declaration, but they are not near each other.",
+ 0, 0
+ },
+
/* 11.2 Function-like Macros */
{