From owner-freebsd-toolchain@FreeBSD.ORG Sat Jan 4 22:54:55 2014 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E686E237 for ; Sat, 4 Jan 2014 22:54:54 +0000 (UTC) Received: from nm23-vm1.bullet.mail.bf1.yahoo.com (nm23-vm1.bullet.mail.bf1.yahoo.com [98.139.213.141]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 973451880 for ; Sat, 4 Jan 2014 22:54:54 +0000 (UTC) Received: from [66.196.81.174] by nm23.bullet.mail.bf1.yahoo.com with NNFMP; 04 Jan 2014 22:49:07 -0000 Received: from [98.139.211.202] by tm20.bullet.mail.bf1.yahoo.com with NNFMP; 04 Jan 2014 22:49:07 -0000 Received: from [127.0.0.1] by smtp211.mail.bf1.yahoo.com with NNFMP; 04 Jan 2014 22:49:07 -0000 X-Yahoo-Newman-Id: 5562.99021.bm@smtp211.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: J3jKZtEVM1mPfN_R1zfesSXgH5T4cDMyxxorHbnikzCTUm5 ezimVdfonpCp1VBXrne0KSX8Yqb4YJA85PHClTlw46S5GMf7ZLtc2KHilOu0 gHp2U2NFnEM3jJjTrESn89IErfdW4GfadyE6S2fDCjwIfJoSTtmTOs8D89vT 8hBEmKKsUpeuwNE3CqZaTby9Cq1mxc2LwQKCMQZcrhOj7qdCGwO0Rd_gwzr5 xG2IkMGE9YN6hh8yGv3dgl95Lls5BJcYXh8h6tvb.NNXSH1CENOTsDaJrZ.b 3PqpiSSr8xdtgARvSxxp8hiLVMCUxXhxU5EStijqxVj4QWdgxboCvvnTaL3j zgZzSJZaRg6Gr.Yo6XEWTSqAl7j8o5gJyptVo_FDhWMh03FPuozbgxEyqpp_ vjN1Bav80hzmZOH962E8HT7H2Z3eUr.7.spfd.lF6B3R8eXEkeGp3NJ2LkqZ _ihBpa5gdCvwudIIMaUXuoefBuMqoeYYMAhxxXLuvy25K1DAyFkBpN6m587q o41qFMgkT.GFBv6zBqqwrooOzjBMax.hoSv8Ep87OFr9R.S6M_oxSG1746Fe TNDz2xJLlIGT7liWvjDT3rLNjM0Hebz_VsaI9ke3xTBiNNWmBW_XqpOFU_8N 95eeD0HnUhLT6qGiMNsaxOj2BGBv50GONZ9WleydRrsHmsbPY1JYe1SEzwCG Gs3eVjVuQrK_Bkm6tj.dzhzifsJMiMacC9mGigIXiSf241CYzLX0ATWqunqi qQykTINOliUID61MnaQRj8xDaobse26t4kp4- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf X-Rocket-Received: from [192.168.0.102] (pfg@190.157.126.109 with plain [98.138.105.21]) by smtp211.mail.bf1.yahoo.com with SMTP; 04 Jan 2014 14:49:06 -0800 PST Message-ID: <52C88FDD.7090701@FreeBSD.org> Date: Sat, 04 Jan 2014 17:49:01 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: David Chisnall Subject: Re: Apple's GCC 42 enhancements (was Re: [CFT] Experimental gcc update). References: <528A924A.8050904@FreeBSD.org> <529127F8.5080606@FreeBSD.org> <3826345B-E783-43C7-B4AB-A05C95C1A8A2@FreeBSD.org> <52C5CA79.90706@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: toolchain@FreeBSD.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jan 2014 22:54:55 -0000 On 02.01.2014 16:48, David Chisnall wrote: > On 2 Jan 2014, at 20:22, Pedro Giffuni wrote: > >> The behaviour is consistent with llvm-gcc though, as explained here: >> >> https://bugs.launchpad.net/ubuntu/+source/llvm-gcc-4.2/+bug/483679 >> >> " looking at the LLVM/Clang documentation (http://clang.llvm.org/doxygen/InitPreprocessor_8cpp-source.html) shows that __block is not actually a keyword, but a macro that is defined to be __attribute__((__blocks__(byref)))." >> >> Not sure what to do about it, I had added a #define for it in Block.h since you have to link with -lBlocksRuntime anyways, but not everything includes Block.h (surely not the libdispatch tests). > Probably the best solution is to put this in cdefs.h: > > #if defined(__BLOCKS__) && !defined(__block) > # define __block __attribute__((__blocks__(byref))) > #endif > > (With the indentation changed to make it harder to read, as per style(9)). I believe __BLOCKS__ is supported by clang, although testing for it is discouraged in favour of the __has_{feature,extension} mechanism. Thank you for the hint. Is there some way to have this happen only for our GCC-4.2.1 but not for clang or newer gcc? I am getting ready to commit the blocks support [1] but we can leave the macro magic for later, while there is some consensus on the dark arts involved ;). Pedro. [1] I ran buildworld and rebuilt boost and some ports with the modified compiler ... so far, so good. I don't think an exp-run is necessary since the blocks stuff is not yet being used for any port.