Request for reviews (S): 6934483: GCC 4.5 errors "suggest parentheses around something..." when compiling with -Werror and -Wall

Christian Thalinger christian.thalinger at oracle.com
Wed Sep 8 09:08:29 PDT 2010


On Wed, 2010-09-08 at 08:58 -0700, Chuck Rasbold wrote:
> 
> 
> On Wed, Sep 8, 2010 at 8:55 AM, Chuck Rasbold <rasbold at google.com>
> wrote:
>         If I'm not too late, and not picking nits...
>         
>         
>         In referenceProcessor.hpp, we used to have:
>         
>         
>         if (_was_discovering_refs = _rp->discovery_enabled())
>         
>         which was concise, but could cause confusion over "=" vs.
>         "==".
>         
>         
>         Now we add an extra set of parens, which is less concise and
>         more puzzling.
>         
>         
>         if ((_was_discovering_refs = _rp->discovery_enabled())) {
>         
>         
>         Can we do:
>         
>         
>         
>         
>         if ((_was_discovering_refs = _rp->discovery_enabled())) {
>         
> Sorry, I meant:
> 
> 
> Can we have:
> 
> 
>            _was_discovering_refs = _rp->discovery_enabled();
>            if (_was_discovering_refs) { 
>         
>         instead?

Not too late.  And yes, I agree.  -- Christian



More information about the hotspot-runtime-dev mailing list