Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8255544

Create a checked cast

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b23

      Backports

        Description

        In many places we've added C-style casts to silence compiler warnings, for example when truncating a size_t to an int when we know the size_t is a small struct. Such casts are inherently risky, because they effectively disable useful compiler warnings. We should add a form of cast that checks at runtime that a truncation does not overflow.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                aph Andrew Haley
                Reporter:
                aph Andrew Haley
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: