From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 03:02:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 00F3F718 for ; Thu, 26 Mar 2015 03:02:43 +0000 (UTC) Received: from nm24-vm0.bullet.mail.bf1.yahoo.com (nm24-vm0.bullet.mail.bf1.yahoo.com [98.139.213.161]) (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 AB8C9E72 for ; Thu, 26 Mar 2015 03:02:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1427338961; bh=Gbdd5CZL0zRAxssAqWXw1QOreYLPdOubTlPCI4dmPgk=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=NtV9g/Awzsbkdj0MiY6dReOt+gBGgyK1wpB2cR0a6DEoZ8YHJeKCicG5iEmjEhhr5QHM4fEvubdhJisp4cUKiKl9PToP9XXX3jNnYAy/eAJptvj3CppY4/iFJMaw3XEOBMTYeR7CSTlzUUjnFJ/3OwFDDHMa7Dd1xzofq2RXh4OSJ9iDn/9b6GXHeYCPHbNvToZ4e1B9P6ixNVOWh6kKrIounugkF/ARqkIf+Yx2PX6UnvRtGOXjuPlxrfVnw1cOKlikUDiOF/S6Rnfx5l3EWTAAPtNMRoFsuMpqTVJ22xZ8Zdu1Ylrbg4VHxgKmiKucBELxwWrM9g7c6b7MXh/SgA== Received: from [98.139.170.181] by nm24.bullet.mail.bf1.yahoo.com with NNFMP; 26 Mar 2015 03:02:41 -0000 Received: from [98.139.211.192] by tm24.bullet.mail.bf1.yahoo.com with NNFMP; 26 Mar 2015 03:02:41 -0000 Received: from [127.0.0.1] by smtp201.mail.bf1.yahoo.com with NNFMP; 26 Mar 2015 03:02:41 -0000 X-Yahoo-Newman-Id: 794932.28704.bm@smtp201.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: _mZHH4MVM1nKvZMFPRykiG1JoFz0EHlR7vyNcTvbGOMibGb u9XUpQ7HulhdNwrBhXy01aqxO0m7NbDg8A3R0Nt5HngPRKGwRNE4.GijFvrG Qe4mNT_IfMD.BISosb9FswOuQAmTvq5bUj.wjN8k69UPAWfLA0bExjQZk4zB qnu2PgNqSeVN499Dhy0KgvIFBP_dG4F5vPgyGGyvSyBCtfq2V_qYTnzDYCzH E5jIN18rDoqFuuLGvFY0j2JUWeqzEhGh1HfzUvYNvd.HsMq0GtTGChM_Q8CP fNHEokBbqpLFYbWf5yDczEvXH6d7cCAvYSVYngpc9SRDZ1EmkqSQlqYqcxjP LY2vmIcS1n_FDn7tBBtAWoXRR23p26lq0Tqt6aYeZlrZD5oNhL9BFeqr0FKH dWoN2eUk3UL.q2KuKxtM.zlrKEa8Hd.sErLl7vWU8olfg0e1kloDpWRTnO9j G0kU.x0Z_bUtwJeA9.4x7xJC6sUnRad.cILWsV8rjnqEvFnxI5hthImG4MRp .dvRsupKE3Et.M6VTPzlVTnTr9dcpWEamGpj4NdkiH6OhFRyqk.mn4pgbgr2 T_yylqfRtQVbcKvOQ6Jkke4MC6AmDW4jjNxbKkTtoOiv12WB55x3ttLnx7Iy OmxqtdEC9mOabCY1T3dVGXZlYvIADt0lfVZnMgW5K2Dkp34XZyNiY75Yvl46 AgtnvW8w- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <551376D4.4030003@FreeBSD.org> Date: Wed, 25 Mar 2015 22:02:44 -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> In-Reply-To: <20150326130403.W993@besplex.bde.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 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: Thu, 26 Mar 2015 03:02:44 -0000 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. > The ifdefs for __nonnull() seem to be broken. They assume that > all versions of gcc >= 3.3 support the same semantics for __nonnull() > and that no non-gcc compiler supports the __nonnull__() attribute. All versions of gcc >= 3.3 support the same semantics for __nonnull(). Unfortunately an older revision of cdefs.h was only accepting one argument while gcc accepts multiple arguments just fine. > Non-gcc compilers like clang get this by pretending to be gcc. Clang claims support for gcc attributes [1] and has a __has_attribute() macro for testing. It also reports itself as gcc 4.2 for compatibility so we don't need to test for availability for the older attributes. > > Non-gcc compilers like icc tend to not get this by not pretending to > be gcc. __nonnull__() is one of the few attributes that is only a > hint, so definining it as nothing when it is not known to work is > correct. > The reason why I had to revert the change is actually a systematic bug in gcc: during it's build process gcc generates a new cdefs.h from our headers. Attempting to use an older gcc from ports that was build with the broken mono-parameter __nonnull() ended up causing breakage in any code using signal.h or pthreads.h. The lesson here is to update gcc every time cdefs.h is updated (I will be updating it at least once more[2]) and, in my case, I'll have to wait a couple of weeks after committing a cdefs.h change before using the new attributes to give time for people to update their gcc* ports, and I'll likely have to note it in UPDATING too, JIC. Cheers, Pedro. [1] http://clang.llvm.org/docs/LanguageExtensions.html#feature-checking-macros [2] https://reviews.freebsd.org/D2107