Fix cast-function-type warning in TemplateTable

XMLWordPrintable

    • 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.

              Assignee:
              Aleksey Shipilev
              Reporter:
              Aleksey Shipilev
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: