-
Type:
Enhancement
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: 8-shenandoah, 11-shenandoah, 14, 15
-
Component/s: hotspot
-
b24
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
|---|---|---|---|---|---|---|
| JDK-8245895 | 14u-cpu | Aleksey Shipilev | P4 | Resolved | Fixed | master |
| JDK-8245730 | 14.0.2 | Aleksey Shipilev | P4 | Resolved | Fixed | b08 |
Asserts are defined like this:
#define shenandoah_assert_correct(interior_loc, obj) \
ShenandoahAsserts::assert_correct(interior_loc, obj, __FILE__, __LINE__);
...and used like this:
shenandoah_assert_correct(NULL, obj);
So, after macro-expansion, we get ";;", which triggers static analysis tools (e.g. CLion). We should really do what the usual assert() macro does: drop the ";" in the macro definition.
#define shenandoah_assert_correct(interior_loc, obj) \
ShenandoahAsserts::assert_correct(interior_loc, obj, __FILE__, __LINE__);
...and used like this:
shenandoah_assert_correct(NULL, obj);
So, after macro-expansion, we get ";;", which triggers static analysis tools (e.g. CLion). We should really do what the usual assert() macro does: drop the ";" in the macro definition.
- backported by
-
JDK-8245730 Shenandoah: rich asserts trigger "empty statement" inspection
-
- Resolved
-
-
JDK-8245895 Shenandoah: rich asserts trigger "empty statement" inspection
-
- Resolved
-