On Fri, 30 Apr 2021 18:17:39 GMT, Phil Race <p...@openjdk.org> wrote:

>> I also think GCC does not do any static analysis of the code calling. And 
>> also the code uses `struct` like a C++ class, so I guess GCC reports 
>> incorrect warnings at this point.
>> Many -Warray-bounds related issues are reported in [GCC 
>> Bugzilla](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56456). Especially it 
>> does not seem to work when the value is accessed by a pointer 
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99474 - it looks alike to me.
>> 
>> WebKit seems to encounter [similar 
>> issue](https://bugs.webkit.org/show_bug.cgi?id=224782), they has avoided it 
>> with pragma.
>> 
>> I concidered to disable it with a compiler option in makefile of course as 
>> you said, but I didn't do so because I heard in other review (I forget the 
>> JBS ticket) that we should disable warnings locally because they might be 
>> useful in future.
>
> In this case the rest of the code here is unlikely to change so I think it is 
> fine to put it in the build and
> it will be easier to revert it when gcc is fixed .. and since the warning 
> looks like it is bogus more often
> than not wider blocking of it is probably OK anyway. But I am also sure this 
> is the only case.

I disabled -Warray-bounds in Awt2dLibraries.gmk in new commit. Is it ok?

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

PR: https://git.openjdk.java.net/jdk/pull/3788

Reply via email to