<div dir="ltr">Yes. The particular reason I disabled it was because there are various headers<br>which are processed in C++ mode as part of the test suite (on OS X) -- <br><a href="http://carbon.mm">carbon.mm</a> and <a href="http://cocoa.mm">cocoa.mm</a>. Blocks in these files tend to confuse the current<br>
C++ support. Here is an example (typed from memory) which goes particularly<br>bad:<br>--<br>void f0(void (^)(void));<br><br>int f1(void) { return 0; }<br><br>int f2(void) { return (char) 0; }<br>--<br>(If typed correctly) the interaction between blocks and C++ was causing a very<br>
non-sensical error in function f2. <br><br> - Daniel<br><br><div class="gmail_quote">On Fri, Oct 10, 2008 at 8:39 AM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com">clattner@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c"><br>
On Oct 10, 2008, at 1:23 PM, Argiris Kirtzidis wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Daniel Dunbar wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Author: ddunbar<br>
Date: Thu Oct  9 19:20:52 2008<br>
New Revision: 57334<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=57334&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=57334&view=rev</a><br>
Log:<br>
Disable blocks support in C++ mode.<br>
</blockquote>
<br>
Chris mentioned here:<br>
<a href="http://thread.gmane.org/gmane.comp.compilers.clang.devel/2407" target="_blank">http://thread.gmane.org/gmane.comp.compilers.clang.devel/2407</a><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The syntax of blocks and C++ lambdas are completely different, so we<br>
expect to eventually support both in the same compiler<br>
</blockquote>
<br>
Which gave me the impression that blocks would be supported in C++ too,<br>
is this not the case ?<br>
</blockquote>
<br></div></div>
Yep, the C++ support in Clang is just not there yet.  Blocks are supported in g++/llvm-g++.<br><font color="#888888">
<br>
-Chris<br>
</font></blockquote></div><br></div>