RFR: Fix build error on MacOS / Clang 14.0.0

William Kemper wkemper at openjdk.org
Tue Apr 4 17:32:43 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

LGTM

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

Marked as reviewed by wkemper (Committer).

PR Review: https://git.openjdk.org/shenandoah/pull/243#pullrequestreview-1371462483


More information about the shenandoah-dev mailing list