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

Fix cast-function-type warning in TemplateTable

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 20
    • 11, 17, 19, 20
    • hotspot
    • b25

      After JDK-8294314, we would have templateTable.cpp excluded with cast-function-type warning. The underlying cause for it is casting functions for `ldc` bytecodes, which take `bool`-typed handlers:

      ```
      /home/shade/trunks/jdk/src/hotspot/share/interpreter/templateTable.cpp:206:29: error: cast between incompatible function types from 'void (*)(bool)' to 'Template::generator' {aka 'void (*)(int)'} [-Werror=cast-function-type]
        206 | def(code, flags, in, out, (Template::generator)gen, (int)arg);
      ```

      We can make the handling more explicit.

            shade Aleksey Shipilev
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: