From owner-svn-src-head@freebsd.org Fri Aug 28 15:36:02 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F85F9C4FB9 for ; Fri, 28 Aug 2015 15:36:02 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm38-vm0.bullet.mail.bf1.yahoo.com (nm38-vm0.bullet.mail.bf1.yahoo.com [72.30.239.16]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E1AC663 for ; Fri, 28 Aug 2015 15:36:02 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1440775773; bh=SdHpbwoO4FlxS1LOe5TdzOZYHJjxB2Z6vak33VpjuN4=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=J+u/pykvnYcuP7vdY4pYZRYZbCkYGazVhL1omwMQW6PXwEyCgT1w+hVSwnF3V+tEIgE9DgsceL3lWQlqklFJKeo1QKdKbqhp02CgXDxwvvNbdWXpL2fhsLg4N5lTuBk1hj/LrIzcmoiVjC3OavdurJLUBXYGS8MuY2nhYNndefDr7xugQg4jnpUl0bl+2uBuk1v6zcomCvyE2A/7eZ8Ldsuf/uW3XR26eGGrfbMuio/tpeATjxk6UM2jfRZU9bsKP4ga5VqmMDznzcg0UPz5YPNEktxFCp+q/UX2bq9jP7xs9sq3AlWedIzOSHcBsP1+L0Qxwz0jddgAhUgQU91jHA== Received: from [98.139.170.178] by nm38.bullet.mail.bf1.yahoo.com with NNFMP; 28 Aug 2015 15:29:33 -0000 Received: from [98.139.211.197] by tm21.bullet.mail.bf1.yahoo.com with NNFMP; 28 Aug 2015 15:29:33 -0000 Received: from [127.0.0.1] by smtp206.mail.bf1.yahoo.com with NNFMP; 28 Aug 2015 15:29:33 -0000 X-Yahoo-Newman-Id: 32933.90442.bm@smtp206.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: w8HTTocVM1nWy6fLFx4.UCjIF.RBc_kj.8tdnwquUO7n3gz ibjvXi1c.dxTXZeyEFE2G1llfYzEzs67CCEby17IMtbEW3L8JCfFmBxYRzf6 IVvXWBpR_lPbQdsje3UTUimgeecjD_BpgadiTR_3b8w4VN.9GKWucEGCZ8OO 0YmI8LvviQ.Aqge4O2Lp6SKqte9SXzVeQSYosqBZvcnnYYDo6Z6hcOml0ECo rd1KNJhmJZxcPX31pANXUTVLAZ1.dhQ6XbL2ULgTDA5K0.VqB57RZ9oCkiYx PVqT953SiTZcEMudGKe3UC.T1T4ADPM3kJ3jZa36j3ALttyLOgT6RxrAS6zu CGTZxNKS22ckkmWRcvjI8OVJiYI.RNsXsMLeCJCYs9IEfWAOtdr_i.uC0EZr mtgayT0fNPVDDPN6eHkwEEhhYzSthTnFFXCfl8vr1K17IOWM1_bv8PA0lQLQ NrxR.F..ZjRgjC1gY2Cu28RZAN1T9DE1SDtfS8735_mjoZsWn2Oj1VHOgOQO 4UUaqDzMk2repfjfGU1Qsg22ShzT1zPh. X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r287254 - head/sys/sys To: Tijl Coosemans References: <201508281406.t7SE6TYQ002370@repo.freebsd.org> <20150828172212.1fcf0b53@kalimero.tijl.coosemans.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Pedro Giffuni Message-ID: <55E07E65.9020802@FreeBSD.org> Date: Fri, 28 Aug 2015 10:29:41 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150828172212.1fcf0b53@kalimero.tijl.coosemans.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Aug 2015 15:36:02 -0000 On 08/28/15 10:22, Tijl Coosemans wrote: > On Fri, 28 Aug 2015 14:06:29 +0000 (UTC) "Pedro F. Giffuni" wrote: >> Author: pfg >> Date: Fri Aug 28 14:06:28 2015 >> New Revision: 287254 >> URL: https://svnweb.freebsd.org/changeset/base/287254 >> >> Log: >> Be more GCC-friendly with attributes >> >> Being clang the default compiler, we were always giving precedence to >> the __has_attribute check. Unfortunately clang generally doesn't support >> the new attributes (alloc_size was briefly supported and then reverted) >> so we were always doing both checks. Give the precedence to GCC as that is >> the working case now. >> >> Do the same for __has_builtin() for consistency. >> >> Modified: >> head/sys/sys/cdefs.h >> >> Modified: head/sys/sys/cdefs.h >> ============================================================================== >> --- head/sys/sys/cdefs.h Fri Aug 28 13:57:30 2015 (r287253) >> +++ head/sys/sys/cdefs.h Fri Aug 28 14:06:28 2015 (r287254) >> @@ -237,12 +237,12 @@ >> #define __aligned(x) __attribute__((__aligned__(x))) >> #define __section(x) __attribute__((__section__(x))) >> #endif >> -#if __has_attribute(alloc_size) || __GNUC_PREREQ__(4, 3) >> +#if __GNUC_PREREQ__(4, 3) || __has_attribute(alloc_size) > > I think you have to add underscores to the __has_attribute argument, > like __alloc_size__ here, because user code is allowed to use > alloc_size. > Hmm .. yes, it certainly won't hurt. Thanks! Pedro.