rs6000_handle_option global state avoidance, part 1

Michael Eager eager@eagercon.com
Thu May 5 21:29:00 GMT 2011


Joseph S. Myers wrote:
> On Thu, 5 May 2011, Michael Eager wrote:
> 
>> David Edelsohn wrote:
>>> On Wed, May 4, 2011 at 7:54 AM, Joseph S. Myers <joseph@codesourcery.com>
>>> wrote:
>>>
>>>> Two options, -mcmodel= and -mfpu=, had cases that fell through to the
>>>> next case without comments to indicate if this was intended.  I added
>>>> comments to make the semantics explicit.  Given the documentation, it
>>>> may well be intentional for -mcmodel= but is more doubtful for -mfpu=.
>>> I doubt that either of the fall through cases was intended.
>>>
>>> Alan, is mcmodel suppose to set m64?
>>>
>>> Michael, is mfpu suppose to set mrecip?
>> No.  There was a break statement at the end of case OPT_mfpu which
>> disappeared when OPT_mrecip was added.
> 
> Thanks.  I'll apply this patch which removes the fall through, and adds 
> explicit Var and Init to the mfpu= entry in rs6000.opt to avoid problems 
> (when building as C++, as shown by a regression tester) with 
> 0-initialization of the field that gets automatically generated by the 
> .opt machinery for any Target option not using Var.

Looks good.

-- 
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077



More information about the Gcc-patches mailing list