RFR: 8325163: Enable -Wpedantic on clang

Julian Waters jwaters at openjdk.org
Mon Feb 5 07:00:01 UTC 2024


On Sun, 4 Feb 2024 22:52:19 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:

> > Guess I could work on the gcc counterpart and find a way around the inability to disable -Wpedantic with it in tandem with this change...
> 
> I don't think that is possible. The double semicolon rule can only be disabled by disabling pedantic completely. This is not the first time we've run into trouble because gcc do not have fine-grained enough warnings. :( (While clang has always excelled in this area.)

I tried compiling this on both Linux and Windows, and it seems like there are only a few places where the double semicolons are actually a problem (The strangest case was in a NOT_LP64 macro in mallocHeader.hpp where gcc exploded when parsing a perfectly valid semicolon). This is more of a code style cleanliness check than anything, but as Kim said, it is probably a bug within gcc somewhere. I'll file a gcc bug for this in the meantime

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

PR Comment: https://git.openjdk.org/jdk/pull/17687#issuecomment-1926339574


More information about the client-libs-dev mailing list