From owner-svn-src-head@FreeBSD.ORG Thu Mar 26 14:06:00 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E8CCDB06 for ; Thu, 26 Mar 2015 14:06:00 +0000 (UTC) Received: from nm30-vm0.bullet.mail.bf1.yahoo.com (nm30-vm0.bullet.mail.bf1.yahoo.com [98.139.213.126]) (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 9CEF4CD4 for ; Thu, 26 Mar 2015 14:06:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1427378753; bh=fanq69AOzJQgyp7EJbEz1wdzbTRgFeU66Ath7UjgmuY=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=r3/quHvntN5r+XJdMctmZ2X48kCMoN1XbA0qYfpM8srZveVWjOjJ3dKTk4cDhTvzi1Sd8kIycLSw4y34po8Mb5siZj7nLQH8t3lrp1xL4Q5eBI/aCYDyRd3ZaGvgYnbOcby7HtZS+tsGqouHny2aiXTIbxonM/u8LaH2voGDbMCLm7ZCpTjdxYwQ2dkQpokPkUPEY1BP5lomkdDEC5yNGaO40BAag4zgH41AKjcjWD5U0Qcn8PlGo6XdsJd3dIcoap4CJa/JMs6cCsysyom0ewy40a2FKcnXoPwW/Ob8lizzuvcDpSJCRhzuqq4S/pxxoiicmsNchklugUTgEp+Scg== Received: from [98.139.170.178] by nm30.bullet.mail.bf1.yahoo.com with NNFMP; 26 Mar 2015 14:05:53 -0000 Received: from [98.139.211.202] by tm21.bullet.mail.bf1.yahoo.com with NNFMP; 26 Mar 2015 14:05:53 -0000 Received: from [127.0.0.1] by smtp211.mail.bf1.yahoo.com with NNFMP; 26 Mar 2015 14:05:53 -0000 X-Yahoo-Newman-Id: 998110.51619.bm@smtp211.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: i71NvMUVM1nzfRQypWgQ8i_w6_1FtjyenJPpmU8.kuJXc_Y P_PBJG5HJaPW9PHsUa4xWQvgnebHQStNY9qLoweyV7imVboH6TYX9DopV3ow 6NQ1CY1DepBBObK9GLBKpvnfRH0POJTV7Pn3AohAv.MJFGcxCUpOPFAiSg55 TRyaJWVzCRunWUvhz1GBPfTtkX3_89CSbWYKciSMC1pWDlOYiFV_3a15NvfV ljCb2NGEyWjnYTF51m121cmmUxmaJIPALEBJq2hySTw7Dr9605DngtLMU0r4 LxA4Vx8CDTeDVlBx18xcCB9Sa41aUte9Vaj72ZoxsolXYz2kaUYAlGTK_KA. Gd.M2Db1IfqTOQmpfuxWjs4NF83Ij0CxE7xvnwnecDjud1unok691D1kU4ld VvMTZs7F6HstHPaVwcUio4AffDecjWL25_RJRpTJ9u698QzG.XLjmuGvF3py 6z79crkXFQH6B75dwZ0m2OgCP3Ty3btGVFAMcDVueLJdKcmrP77oTUcyjRUC Hq_lvEh2b5TQMJJNh_SAMe9Ix1DxgaDYSSCpWs4RB1.t.v.Lgn5V1OTcBShy c1f4RWKwHoHSmBsTL9QuY9w8JnTw9iSyy39MyB3axXChX369e3GafYwvzm4b WsmhpxCFfr40- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <55141244.7030408@FreeBSD.org> Date: Thu, 26 Mar 2015 09:05:56 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Bruce Evans Subject: Re: svn commit: r280636 - head/include References: <201503252153.t2PLrInc025854@svn.freebsd.org> <20150326130403.W993@besplex.bde.org> <551376D4.4030003@FreeBSD.org> <20150326170535.U2239@besplex.bde.org> In-Reply-To: <20150326170535.U2239@besplex.bde.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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: Thu, 26 Mar 2015 14:06:01 -0000 On 03/26/15 01:37, Bruce Evans wrote: > On Wed, 25 Mar 2015, Pedro Giffuni wrote: > >> On 03/25/15 21:14, Bruce Evans wrote: >>> On Wed, 25 Mar 2015, Pedro F. Giffuni wrote: >>> >>>> Log: >>>> Temporarily revert 280458. >>>> >>>> GCC is still carries an old version of cdefs.h which doesn't >>>> accept multiple parameters for the nonnull attribute. >>>> Since this issue probably affects many ports in the tree >>>> we will revert it for now until gcc gets fixed. >>> >>> Note that sys/cdefs.h is supposed to work with any version of >>> gcc back to gcc-1, and does mostly work back to at least gcc-2.95. >>> The whole point of sys/cdefs.h is to provide compatibity macros >>> for old and other non-default compilers. Standard compilers don't >>> even have __attribute__(()). So no changes in future versions >>> of gcc will fix the previous commit. >>> >> cdefs.h still works for all versions of gcc back to gcc-1 AFAICT. > > I now remember other bugs in it. I think you put the varargs stuff > in the non-gcc version. That won't work compilers that don't support > varargs for macros. Neither will not changing the non-gcc version. > According to the gcc documentation [1] "Variadic macros are a new feature in C99. GNU CPP has supported them for a long time, but only with a named variable argument (‘args...’, not ‘...’ and |__VA_ARGS__|). If you are concerned with portability to previous versions of GCC, you should use only named variable arguments. On the other hand, if you are concerned with portability to other conforming implementations of C99, you should use only |__VA_ARGS__|." I gave priority for C99 conformant compilers instead of older (which?) gcc versions. > glibc (2.6 at least) avoids using varargs in its __nonnull() macro > by using the same portable method that is used in many optional > debugging statements including FreeBSD's KASSERT(). I will take a look at KASSERT(), I normally avoid looking at glibc as it is likely to have GNUisms, and maybe even license issues. > (KASSERT() is > broken as designed. It never needed this since it wasn't implmented > until several years after C99 standardized varargs for macros.) > The macro takes a single arg consisting of a normal list of args > enclosed in parentheses. Hmm.. I think Android's Bionic libc does the same, it's really ugly. Thanks, Pedro. [1] https://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html