RFR: 8314114: Fix -Wconversion warnings in os code, primarily linux [v5]

Andrew Haley aph at openjdk.org
Mon Aug 14 02:23:58 UTC 2023


On Sat, 12 Aug 2023 06:51:39 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> One proposal, possibly for a future RFE: could we maybe make checked_cast a smaller name? One gripe with C++ cast expressions I have is that they look ugly and give me RSI. Since this is our own name, and it is really omnipresent now, could we not shorten it (similar to macro names like "p2i")? For example `cc`

There's a C++ style that goes with idiomatic C++ programs. I chose `checked_cast<T>` because it is almost obvious to the reader familiar with C++ idioms what it's likely to do. In general, where there is precedent, I think we should go with existing C++ style.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/15229#issuecomment-1676565704


More information about the hotspot-dev mailing list