<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 25, 2015, at 11:58 AM, John McCall <<a href="mailto:rjmccall@apple.com" class="">rjmccall@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 14px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">On Feb 25, 2015, at 8:14 AM, Ben Langmuir <<a href="mailto:blangmuir@apple.com" class="">blangmuir@apple.com</a>> wrote:<br class=""><blockquote type="cite" class="">On Feb 24, 2015, at 2:30 PM, John McCall <<a href="mailto:rjmccall@apple.com" class="">rjmccall@apple.com</a>> wrote:<br class=""><br class=""><blockquote type="cite" class="">On Feb 24, 2015, at 11:14 AM, Ben Langmuir <<a href="mailto:blangmuir@apple.com" class="">blangmuir@apple.com</a>> wrote:<br class="">Hi John,<br class=""><br class="">As we discussed:<span class="Apple-converted-space"> </span><br class=""><br class="">Allow (Object *)kMyGlobalCFObj casts without bridging<br class=""><br class="">Previously we allowed these casts only for constants declared in system<br class="">headers, which we assume are retain/release-neutral. Now also allow them<br class="">for constants in user headers, treating them as +0.  Practically, this<br class="">means that we will now allow:<br class="">id x = (id)kMyGlobalConst;<br class=""><br class="">But unlike with system headers we cannot mix them with +1 values:<br class="">id y = (id)(b ? kMyGlobalConst : [Obj newValAtPlusOne]); // error<br class="">id z = (id)(b ? kSystemGlobalConst: [Obj newValAtPlusOne]); // OK<br class=""><br class=""><extern-global-const-unbridged-cast.patch><br class=""></blockquote><br class="">Yes, this good great, thank you.<br class=""><br class="">You should also adjust the ARC specification:<br class=""></blockquote><br class="">Updated patch attached with the spec updates.<br class=""><br class=""><blockquote type="cite" class=""><br class="">1. Add "a load from a const non-system global variable of C retainable<br class="">pointer type” to the list of known unretained expressions in the section<br class="">entitled "Conversion to retainable object pointer type of expressions<br class="">with known semantics”.  This should have a “beginning LLVM 3.6” note;<br class="">when it’s available in a released Apple compiler, we can be more specific.<br class=""></blockquote><br class="">Note the “of C retainable…” bit is part of the context for this list of bullets.  I stole the “beginning LLVM 3.6” revision syntax from elsewhere, so hopefully I got it right. I’m having a bit of trouble with sphinx, but I’ll be sure to check the generated doc before I commit.<br class=""><br class=""><blockquote type="cite" class="">2. Add a note to the rationale explaining the different treatment of<br class="">system and non-system globals: basically, that it’s reasonable to assume<br class="">that global constants were initialized with true constants (e.g. string<br class="">literals), but user constants might have been initialized with something<br class="">dynamically allocated, using a global initializer.<br class=""></blockquote><br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 14px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 14px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">I’m not going to manually verify the ReST syntax, but the text looks great, thanks.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 14px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></div></blockquote><div><br class=""></div><div>Thanks! r230534</div></div></body></html>