From owner-freebsd-toolchain@FreeBSD.ORG Sun Jan 5 04:36:13 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 C379C4D7 for ; Sun, 5 Jan 2014 04:36:13 +0000 (UTC) Received: from nm10-vm0.bullet.mail.bf1.yahoo.com (nm10-vm0.bullet.mail.bf1.yahoo.com [98.139.213.147]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5E6BA1EE2 for ; Sun, 5 Jan 2014 04:36:13 +0000 (UTC) Received: from [98.139.212.149] by nm10.bullet.mail.bf1.yahoo.com with NNFMP; 05 Jan 2014 04:36:06 -0000 Received: from [98.139.213.8] by tm6.bullet.mail.bf1.yahoo.com with NNFMP; 05 Jan 2014 04:36:06 -0000 Received: from [127.0.0.1] by smtp108.mail.bf1.yahoo.com with NNFMP; 05 Jan 2014 04:36:06 -0000 X-Yahoo-Newman-Id: 998124.44414.bm@smtp108.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: _msANjkVM1mnUhHAZOzByVzT46V1OEkf4Bz6eVk1f8IBFHq MpfaUA1WJmF9tVYSznilMDVHUtOir1xeaG8opEVn9VYODjtGClNkO8JfNX6D 9.GYiXqX9ixl1RMJB19Gxh1NHgX1c92LiErEWVqMH1GhHokhiUgnpvcLIeje NSITyQJiErT4w8rQ1NhaKiPyeNVCcSHz1jjjSfoFqudPToMk5pHS2.dGDmAz xxZUoLGgELUWZwPDXkgR8n7TXh3hSTaAvfOKiTtRHy0iNuOSsLPfA0mJBpaQ 0tPqS1Af85bgHWI7CFXtzy0rSp_h3f8q_QWCav4f27S3.RxP5WW_xTSKKt_L wlO9FBu0rUqatecoeTHgKBHJmVUcGHhn26oXjjSN30.RV5iNoZojEyPd8CS2 Q306Ic4zb.BiGwbws4DNViZj3QRthASmvfPs5gB7fyfJtTnKEnPHWAfDkILV 4GQcKiSlNjGGbdqemqmNw6pNsx2Ci5l4K2vyGVd73cwGKtO0mx_3E8HpuRx4 vxkaK8.hgcH6RcU3mpCazCk4BQguA0U6sB8Epqfhugf_HeG6KS9G3QmThDPp 63iqP55xGgtPwQSwTjDdPgiDY4_E8ID9kkwsA1QvJpGOGrz1IDunc1z59KRd 8bGvLG3WCRW7Ulzm.nbA5bOGmJaIuVlCXWMvbhlHYg8D8fLH9xcD3s3R7Cuj N1owT2usj1VA6SJyEzvnAq5n8pFcQlv6Ta052ooCXc_M_IOYOYQ0zcRtUj11 vonFWeJ_aOGWtlRTwPyrJffVAJ.c7tdHHtA-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf X-Rocket-Received: from [192.168.0.102] (pfg@190.157.126.109 with plain [98.139.211.125]) by smtp108.mail.bf1.yahoo.com with SMTP; 04 Jan 2014 20:36:05 -0800 PST Message-ID: <52C8E129.3030106@FreeBSD.org> Date: Sat, 04 Jan 2014 23:35:53 -0500 From: Pedro Giffuni Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; 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> <52C88FDD.7090701@FreeBSD.org> In-Reply-To: <52C88FDD.7090701@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit 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: Sun, 05 Jan 2014 04:36:14 -0000 El 04/01/2014 5:49 p. m., Pedro Giffuni escribió: > 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? > Bah, nevermind ... it should work just fine. Feel free to go ahead though, I don't want to play with the style on that particular file ;-). > 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 ;). > Committed as r260311. I am hoping to see a lot more uses of blocks/GCD in the base system now :). Pedro.