RFR: 8327460: Compile tests with the same visibility rules as product code [v2]
David Holmes
dholmes at openjdk.org
Wed Mar 13 07:28:17 UTC 2024
On Tue, 12 Mar 2024 13:55:11 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:
>> test/hotspot/jtreg/runtime/ErrorHandling/libTestDwarfHelper.h line 24:
>>
>>> 22: */
>>> 23:
>>> 24: #include <stdio.h>
>>
>> Seems unneeded.
>
> So what I did here was change:
>
> #include "jni.h"
> #include <stdio.h>
>
>
> into
>
> #include <stdio.h>
>
> #include "export.h"
> #include "jni.h"
>
>
> The reordering was strictly not needed, but putting user includes in front of system ones looked like bad coding to me, and put me in a difficult spot in where to add the new `#include "export.h"` -- next to the current user include even if I thought that was wrong, or have the system includes "sandwitched" between two user includes.
>
> Or do you mean that it seems unneeded to include `jni.h` at all? Yes, I agree, but it was there before, and I don't want to make any other changes to the tests. This change is scary enough as it is :-). If you want, I can file a follow-up to remove this include instead.
Yes I meant the include is actually unnecessary, but fine to not make that change here.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18135#discussion_r1522659393
More information about the shenandoah-dev
mailing list