Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note that conversions from float to double or from double to float can also lose information about the overall magnitude of the converted value. See rule NUM06 NUM53-J. Use the strictfp modifier for floating-point calculation consistency across platforms for additional information.

...

Automated detection of narrowing conversions on integral types is straightforward. Determining whether such conversions correctly reflect the intent of the programmer is infeasible in the general case. Heuristic warnings could be useful.

Related Guidelines

...

 

...