I am not sure why the warning states that __weak cannot be specified. AFAIK should be specified even if it is very dangerous to use __weak for automatic variables.
Apple's documentation says that the compiler will provide a warning if you do, but the actual text of the warning seems to imply that the attribute will be ignored not only because its use is dangerous, while the documentation seems to mean it's dangerous but it works as expected (if you really understand what to expect).
You will need to do some experimentation to check if the warning text is inappropriate, or if the documentation has not been updated correctly.
source share