Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Jul 2017 17:22:10 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r321297 - stable/11/sys/sys
Message-ID:  <201707201722.v6KHMAsK038798@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Thu Jul 20 17:22:10 2017
New Revision: 321297
URL: https://svnweb.freebsd.org/changeset/base/321297

Log:
  Revert r316779:
  Remove (yet again) the definition for the GCC __nonnull() attribute.
  
  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 all such uses with the clang nullability qualifiers,
  the GCC attribute is unnecessary.
  
  The version was left around and kept for 11.1-Release for old
  versions of GCC from ports. Newer versions of GCC are not attempting to
  "fix" the system includes so this should not have any side effect and
  matches what we do in -current.

Modified:
  stable/11/sys/sys/cdefs.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/sys/cdefs.h
==============================================================================
--- stable/11/sys/sys/cdefs.h	Thu Jul 20 17:15:18 2017	(r321296)
+++ stable/11/sys/sys/cdefs.h	Thu Jul 20 17:22:10 2017	(r321297)
@@ -376,14 +376,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__))



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707201722.v6KHMAsK038798>