[cfe-commits] r57334 - /cfe/trunk/Driver/clang.cpp

Daniel Dunbar daniel at zuster.org
Fri Oct 10 09:19:00 PDT 2008


Yes. The particular reason I disabled it was because there are various
headers
which are processed in C++ mode as part of the test suite (on OS X) --
carbon.mm and cocoa.mm. Blocks in these files tend to confuse the current
C++ support. Here is an example (typed from memory) which goes particularly
bad:
--
void f0(void (^)(void));

int f1(void) { return 0; }

int f2(void) { return (char) 0; }
--
(If typed correctly) the interaction between blocks and C++ was causing a
very
non-sensical error in function f2.

 - Daniel

On Fri, Oct 10, 2008 at 8:39 AM, Chris Lattner <clattner at apple.com> wrote:

>
> On Oct 10, 2008, at 1:23 PM, Argiris Kirtzidis wrote:
>
>  Daniel Dunbar wrote:
>>
>>> Author: ddunbar
>>> Date: Thu Oct  9 19:20:52 2008
>>> New Revision: 57334
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=57334&view=rev
>>> Log:
>>> Disable blocks support in C++ mode.
>>>
>>
>> Chris mentioned here:
>> http://thread.gmane.org/gmane.comp.compilers.clang.devel/2407
>>
>>  The syntax of blocks and C++ lambdas are completely different, so we
>>> expect to eventually support both in the same compiler
>>>
>>
>> Which gave me the impression that blocks would be supported in C++ too,
>> is this not the case ?
>>
>
> Yep, the C++ support in Clang is just not there yet.  Blocks are supported
> in g++/llvm-g++.
>
> -Chris
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20081010/38ca8760/attachment.html>


More information about the cfe-commits mailing list