From owner-svn-src-all@freebsd.org Fri Aug 28 15:23:26 2015 Return-Path: Delivered-To: svn-src-all@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 468EA9C4868; Fri, 28 Aug 2015 15:23:26 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay114.isp.belgacom.be (mailrelay114.isp.belgacom.be [195.238.20.141]) by mx1.freebsd.org (Postfix) with ESMTP id 59ED6199B; Fri, 28 Aug 2015 15:23:24 +0000 (UTC) (envelope-from tijl@freebsd.org) X-Belgacom-Dynamic: yes X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=b5VF44rymZs9Y1DiFqPAMix8rWtyBsB+bu/OWkEeo3k= c=1 sm=2 a=6I5d2MoRAAAA:8 a=M4tgkDYeLxmORRX0F_oA:9 a=CjuIK1q_8ugA:10 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2DOBgBMe+BV/4OL8VFegxtUWg++C4F4hXsCgTs7EgEBAQEBAQGBCoQkAQEEOhwjEAsUBAklDyoeBhOIMgEIxFcBAQEBAQEBAwEBAQEBAQEXBItihFgzB4QsAQSVP4UGh2pSmhgmhAE8M4JNAQEB Received: from 131.139-241-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.241.139.131]) by relay.skynet.be with ESMTP; 28 Aug 2015 17:22:15 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id t7SFMCUo003936; Fri, 28 Aug 2015 17:22:12 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Fri, 28 Aug 2015 17:22:12 +0200 From: Tijl Coosemans To: "Pedro F. Giffuni" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r287254 - head/sys/sys Message-ID: <20150828172212.1fcf0b53@kalimero.tijl.coosemans.org> In-Reply-To: <201508281406.t7SE6TYQ002370@repo.freebsd.org> References: <201508281406.t7SE6TYQ002370@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Aug 2015 15:23:26 -0000 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.