----- Original Message ----- > Hi, snip...
> > > Arguably the test could be removed but I would prefer to leave it in > > and change the code it so it is actually tested. > > > > -fno-strict-overflow is just too compiler-specific and too far removed > > from the code to be something I would want to rely upon long term. > > -fwrapv is another option and seems to be supported by gcc and clang, at > least. > This is very compiler-specific. We had to add compiler options to work around this as best as possible for the security update, but I don't think that logic should go upstream if possible. -fwrapv was necessary on GCC < 4.2 (used by RHEL 5) and -fno-strict-overflow on later versions. I also didn't see the warnings locally with GCC 5.1. They were flagged after our RPMs were created. > That said, do you think some sort of add-and-check-for-overflow test > would be suitable here? I can take a shot at implementing it, if you > like. > > > Interestingly I see the warning in the 8u71 logs using gcc 4.3.0, > > but don't see the warning in RE's JDK 9 build log using gcc 4.9.2 > > I don't see it directly suppressed either but perhaps -Wno-type-limits > > masks > > it ? > > On my box, I see the same warnings on jdk9. Please see the attached > partial build log (from `make all LOG=trace`). I can confirm these are the same warnings I saw in building the RHEL RPMs for u71. > > Thanks, > Omair > > -- > PGP Key: 66484681 (http://pgp.mit.edu/) > Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 > -- Andrew :) Senior Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: ed25519/35964222 (hkp://keys.gnupg.net) Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222