From owner-svn-src-stable-11@freebsd.org Thu Apr 13 21:02:23 2017 Return-Path: Delivered-To: svn-src-stable-11@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 33223D10438 for ; Thu, 13 Apr 2017 21:02:23 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-43.reflexion.net [208.70.210.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD5188FC for ; Thu, 13 Apr 2017 21:02:21 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 12095 invoked from network); 13 Apr 2017 21:02:20 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 13 Apr 2017 21:02:20 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v8.40.0) with SMTP; Thu, 13 Apr 2017 17:02:20 -0400 (EDT) Received: (qmail 1689 invoked from network); 13 Apr 2017 21:02:20 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 13 Apr 2017 21:02:20 -0000 Received: from [192.168.1.106] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 94B62EC9055; Thu, 13 Apr 2017 14:02:19 -0700 (PDT) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r316779 - stable/11/sys/sys Message-Id: <7B482BAF-6ACA-4303-88FF-4F3E3EDFB440@dsl-only.net> Date: Thu, 13 Apr 2017 14:02:19 -0700 To: svn-src-stable-11@freebsd.org, Pedro Giffuni X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 21:02:23 -0000 > Author: pfg > Date: Thu Apr 13 18:28:40 2017 > New Revision: 316779 > URL:=20 > https://svnweb.freebsd.org/changeset/base/316779 >=20 >=20 > Log: > Temporarily revert r315602. > Bring back the definition for the GCC __nonnull() attribute. > =20 > Old versions of GCC, including the version installed the latest = 11-stable > snapshot with pkg(8), still carry the old attributes. > =20 > The issue is easily fixed by rebuilding GCC but there is no need to = cause > havoc in our user base. The definition by itself is harmless but it = should > be removed again in the near future. >=20 > Modified: > stable/11/sys/sys/cdefs.h > Directory Properties: > stable/11/ (props changed) >=20 > Modified: stable/11/sys/sys/cdefs.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/11/sys/sys/cdefs.h Thu Apr 13 18:13:10 2017 = (r316778) > +++ stable/11/sys/sys/cdefs.h Thu Apr 13 18:28:40 2017 = (r316779) > @@ -376,6 +376,14 @@ > #define __noinline > #endif > =20 > +#if __GNUC_PREREQ__(3, 3) > +#define __nonnull(x) __attribute__((__nonnull__(x))) > +#define __nonnull_all __attribute__((__nonnull__)) > +#else > +#define __nonnull(x) > +#define __nonnull_all > +#endif > + > #if __GNUC_PREREQ__(3, 4) > #define __fastcall __attribute__((__fastcall__)) > #define __result_use_check = __attribute__((__warn_unused_result__)) My understanding was that __attribute__((__nonnull__(x))) and __attribute__((__nonnull__)) were causing some problems because of optimization consequences (code removal). The goal of converting to the new technique (involving lack of __nonnull and lack of __nonnull_all ) was to still have warning notices but without such removal of code if I understand right. If avoiding code removal was the intent behind the removal of __nonnull (and __nonnull_all) use (and use of the __nonull__ attributes) then just having the two lines: +#define __nonnull(x) +#define __nonnull_all=20 might be better for maintaining compatibility with existing older sources that reference __nonnull and/or __nonnull_all . Of course I could be wrong about why the changes were made in the first place or in other details about the alternatives. =3D=3D=3D Mark Millard markmi at dsl-only.net