From owner-svn-src-all@freebsd.org Sun Jan 29 00:45:53 2017 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 D1C09CBBEE8; Sun, 29 Jan 2017 00:45:53 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 8CFA41456; Sun, 29 Jan 2017 00:45:53 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0T0jqfa076162; Sun, 29 Jan 2017 00:45:52 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0T0jqWW076161; Sun, 29 Jan 2017 00:45:52 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201701290045.v0T0jqWW076161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 29 Jan 2017 00:45:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312942 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Sun, 29 Jan 2017 00:45:53 -0000 Author: pfg Date: Sun Jan 29 00:45:52 2017 New Revision: 312942 URL: https://svnweb.freebsd.org/changeset/base/312942 Log: Remove GCC's __nonnull() attribute definition. While GCC's __nonnull__ attribute is generally useful to prevent misuse of some functions it also tends to do rather dangerous "optimizations". Now that we have replaced (r312934) all such uses with the clang nullability qualifiers, the GCC attribute is unnecessary. Remove the definition completely to prevent its use in system's headers. Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Sun Jan 29 00:24:34 2017 (r312941) +++ head/sys/sys/cdefs.h Sun Jan 29 00:45:52 2017 (r312942) @@ -375,14 +375,6 @@ #define __noinline #endif -#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__))