On Wed, 28 Oct 2015, Mike Stump wrote:

> On Oct 28, 2015, at 3:04 PM, Eric Botcazou <ebotca...@adacore.com> wrote:
> >> Why is -fsso-struct= listed only for C and C++, not ObjC and ObjC++?
> > 
> > Because it was not tested with the latter 2 languages at all and may 
> > require 
> > specific adjustments in the respective front-ends to work.
> 
> It won’t.  Fixing the language line for the options and a make to ensure 
> it still builds for you is enough testing.

There *can* be cases where one knows that updates would be needed to 
support a new feature for ObjC and ObjC++.  But those are the exception 
rather than the rule and should have a specific comment explaining what 
the issue is and what would need to be done to enable the feature for 
them.  I don't see why that would apply in this case, so I think just 
adding the languages in c.opt should be enough.  (Cf. for C11 _Atomic:

        case RID_ATOMIC:
          /* C parser handling of Objective-C constructs needs
             checking for correct lvalue-to-rvalue conversions, and
             the code in build_modify_expr handling various
             Objective-C cases, and that in build_unary_op handling
             Objective-C cases for increment / decrement, also needs
             updating; uses of TYPE_MAIN_VARIANT in objc_compare_types
             and objc_types_are_equivalent may also need updates.  */
          if (c_dialect_objc ())
            sorry ("%<_Atomic%> in Objective-C");

but no other C11 feature needed any such disabling for ObjC.  [_Atomic has 
similar disabling for OpenMP, again because of parser constructs involving 
lvalue-to-rvalue conversions that would need updating to generate proper 
atomic loads via convert_lvalue_to_rvalue or otherwise.])

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to