On 11/6/20 1:18 PM, Iain Sandoe wrote: > Hi > > Originally, I had this as a Darwin-only patch, however GNUStep > also makes use of NSObject and similar constructs, so this really > needs to be available to linux-gnu as well. > > tested across several Darwin versions and on x86_64-linux-gnu. > > OK for the c-family changes? > thanks > Iain > > ===== > > This attribute allows pointers to be marked as pointers to > an NSObject-compatible object. This allows for additional > checking of assignment etc. when referring to pointers to > opaque types (or type-erased via a void * cast). > > gcc/c-family/ChangeLog: > > * c-attribs.c (handle_nsobject_attribute): New. > * c.opt: Add WNSObject-attribute. > > gcc/objc/ChangeLog: > > * objc-act.c (objc_compare_types): Handle NSObject type > attributes. > (objc_type_valid_for_messaging): Likewise. > > gcc/testsuite/ChangeLog: > > * obj-c++.dg/attributes/nsobject-01.mm: New test. > * objc.dg/attributes/nsobject-01.m: New test.
OK with a suitable update to documentation. I have no idea the attribute is supposed to do. jeff