<div>Doug,</div>
<div> </div>
<div>Sorry, I missed noticing your response.</div>
<div> </div>
<div>I'm not sure what to do here.  The Clang docs (<a href="http://clang-analyzer.llvm.org/annotations.html#attr_cf_returns_retained">http://clang-analyzer.llvm.org/annotations.html#attr_cf_returns_retained</a>) note that as a Clang-specific attribute.  Do you mean that we should put out a warning if some more strict standard mode is used, or that there should be a warning unless clang-specific attributes are explicitly enabled by some new option?  Or should the test use some sort of "#if __has_feature(attribute_cf_returns_retained)" conditional?  Or is the attribute not allowed after the function declation?   Please instruct.<br>
</div>
<div>-John<br></div>
<div class="gmail_quote">On Wed, Nov 25, 2009 at 4:09 PM, Douglas Gregor <span dir="ltr"><<a href="mailto:dgregor@apple.com">dgregor@apple.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div style="WORD-WRAP: break-word"><br>
<div>
<div class="im">
<div>On Nov 25, 2009, at 3:56 PM, John Thompson wrote:</div><br>
<blockquote type="cite">
<div>I'm not sure this is optimal, but it seems to fix Bug 5605.</div></blockquote>
<div><br></div></div>The parsing is fine, but this is missing some kind of diagnostic, because GCC rejects the test case:</div>
<div><br></div>
<div>
<div>blackthorn:~ dgregor$ gcc t.c</div>
<div>t.c:3: warning: ‘cf_returns_retained’ attribute directive ignored</div>
<div>t.c:3: error: expected ‘,’ or ‘;’ before ‘{’ token</div>
<div>blackthorn:~ dgregor$ g++ t.c</div>
<div>t.c:2: error: attributes are not allowed on a function-definition</div>
<div><br></div>
<div><span style="WHITE-SPACE: pre"></span>- Doug</div>
<div><br></div><br>
<blockquote type="cite">
<div class="im">
<div>-John<br><br></div>
<div class="gmail_quote">On Wed, Nov 25, 2009 at 3:13 PM, John Thompson <span dir="ltr"><<a href="mailto:john.thompson.jtsoftware@gmail.com" target="_blank">john.thompson.jtsoftware@gmail.com</a>></span> wrote:<br>

<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>Thanks.</div>
<div>
<div> </div>
<div>>Any chance you're also interested in tackling the related PR here?</div>
<div> </div></div>
<div>Sure.  I thought it was the same issue, but I guess it's a different code path.  I'm working on it.</div>
<div> </div><font color="#888888">
<div>-John<br></div></font>-- <br>John Thompson<br><a href="mailto:John.Thompson.JTSoftware@gmail.com" target="_blank">John.Thompson.JTSoftware@gmail.com</a><br><br></blockquote></div></div><span><attr_pos2.patch></span>_______________________________________________ 
<div class="im"><br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</div></blockquote></div><br></div></blockquote></div><br><br clear="all"><br>-- <br>John Thompson<br><a href="mailto:John.Thompson.JTSoftware@gmail.com">John.Thompson.JTSoftware@gmail.com</a><br><br>