RFR: Fix build error on MacOS / Clang 14.0.0

Aleksey Shipilev shade at openjdk.org
Tue Apr 4 19:09:55 UTC 2023


On Tue, 4 Apr 2023 17:16:14 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> MacOS / Clang 14.0.0 currently fails with lot of errors like:
> 
> 
> /Users/shipilev/Work/shipilev-shenandoah/src/hotspot/share/gc/shenandoah/mode/shenandoahGenerationalMode.hpp:55:16: warning: 'is_generational' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
>   virtual bool is_generational() { return true; }
>                ^
> /Users/shipilev/Work/shipilev-shenandoah/src/hotspot/share/gc/shenandoah/mode/shenandoahMode.hpp:59:16: note: overridden virtual function is here
>   virtual bool is_generational() { return false; }
>                ^
> 
> 
> Remarkably, no other heuristics are affected by this, even though they do not have `override`-s on them. I think the actual cause is that we use `override` once in the `ShenandoahGenerationalMode`, that is enough to flag this class for inconsistencies. So the easiest fix is to drop `override`.
> 
> Additional testing:
>  - [x] macos-aarch64-server-fastdebug build

GHA builds seem fine, except for Zero (which I would fix separately):
 https://github.com/shipilev/shenandoah/actions/runs/4610464968

Therefore I am integrating.

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

PR Comment: https://git.openjdk.org/shenandoah/pull/243#issuecomment-1496463693


More information about the shenandoah-dev mailing list