• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
-Warc-retain-cycles seems to be on by default with no GUI to disable it
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-Warc-retain-cycles seems to be on by default with no GUI to disable it


  • Subject: -Warc-retain-cycles seems to be on by default with no GUI to disable it
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 07 Apr 2014 12:48:22 -0700

I’m getting a compiler warning:
	capturing 'self' strongly in this block is likely to lead to a retain cycle [-Werror,-Warc-retain-cycles]
I understand the warning but want to suppress it. It seems to correspond to the warning option “Implicit retain of ‘self’ within blocks”, but that one’s flag is -Wimplicit-retain-self, not -Warc-retain-cycles. The “Implicit retain…” setting already defaults to NO, and even overriding it to NO in my target makes no difference.

In fact there is no GUI build setting corresponding to -Warc-retain-cycles. And the build log shows that -Warc-retain-cycles was _not_ one of the options passed to the compiler. The full set of warning flags being used is:

-Wno-trigraphs -Werror -Werror-implicit-function-declaration -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Wobjc-missing-property-synthesis -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations

I’m guessing that -Warc-retain-cycles is implicitly enabled whenever ARC is in use. And either Xcode hasn’t added a GUI setting for it yet, or maybe Clang has renamed this flag from -Wimplicit-retain-self and Xcode hasn’t updated its GUI yet?

—Jens
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Prev by Date: Re: XCode 5.1 iOS SDK?
  • Next by Date: Re: XCode 5.1 iOS SDK?
  • Previous by thread: Re: XCode 5.1 iOS SDK?
  • Next by thread: Global Search Question
  • Index(es):
    • Date
    • Thread