RFR: 8323820: [MacOS] build failure: non-void function does not return a value
Lutz Schmidt
lucy at openjdk.org
Tue Jan 16 18:41:23 UTC 2024
On Tue, 16 Jan 2024 18:07:39 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> I can't reproduce the issue since I don't have the right build setup. But hopefully this change is trivial enough to fix the error.
>
> src/hotspot/share/opto/castnode.cpp line 470:
>
>> 468: return new CastPPNode(c, in, type, dependency, types);
>> 469: }
>> 470: ShouldNotReachHere();
>
> Keep the `fatal` with the message, and just add `return`?
`return nullptr;`
does not create an issue with Xcode 15. Could have been an issue because if Xcode15 recognizes `fatal()` as a `noreturn` function, it could report the `return` as not reachable.
`fatal()` vs. `ShouldNotReachHere()`
Which one creates more helpful debug information?
I'm fine with either one. I will review once decided.
Xcode 12 <-> clang 12
Xcode 13 <-> clang 13
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17449#discussion_r1453843957
More information about the hotspot-compiler-dev
mailing list