On Mon, 7 Aug 2023 08:00:12 GMT, David Holmes <dhol...@openjdk.org> wrote:
>> Hi David, this throw was removed for this method's declaration in the >> corresponding hpp file in an earlier commit [8305590: Remove nothrow >> exception specifications from operator >> new](https://github.com/openjdk/jdk/commit/0f51e6326373ff7d4a4d9a0e3a2788401f73405d), >> but the Author forgot to remove the throw() from the definition as well >> (the error can be viewed in the GHA for the earlier versions of this PR). I >> believe gcc only errors on this in C++17 mode (for some weird reason) and >> not our current C++14 mode, which is why it gets a pass on other platforms > > Thanks for that. C++17 makes exception specifications part of the type system: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0012r1.html Hence a mismatch between a declaration and it's definition is an error. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15096#discussion_r1285607278