RFR: 8067306: Improve STATIC_ASSERT

Stefan Karlsson stefan.karlsson at oracle.com
Wed Jan 7 12:25:17 UTC 2015


Hi Kim,

On 2014-12-19 18:16, Kim Barrett wrote:
> On Dec 19, 2014, at 5:11 AM, Stefan Karlsson <stefan.karlsson at oracle.com> wrote:
>> Would it just not compile or would it produce the wrong answer? If it just wouldn't compile I don't think we should add this extra line noise. If we encounter a problem with it we'll find out and then we can add this workaround. The previous code already worked with only <cond>.
> Since I don’t have an exemplar of a problematic toolchain, I really have no idea.  Unfortunately, my awareness of this potential issue is based on having looked at a number of different implementations of this facility over the years that contain code similar to this, and none of them contained a detailed explanation, just complaints about ancient compilers.  OTOH, it does future-proof for C++11 features, as if *that* will ever be a worry.
>

A bit hard to comment here, since you cut out most of the context.

I'll sponsor and review the patch if you change "(Cond) ? true : false" 
to just "(Cond)". Any potential problems with ancient compilers can be 
dealt with when / if they are causing problems.

thanks,
StefanK


More information about the hotspot-gc-dev mailing list