svn commit: r315602 - stable/11/sys/sys
Pedro F. Giffuni
pfg at FreeBSD.org
Mon Mar 20 01:53:51 UTC 2017
Author: pfg
Date: Mon Mar 20 01:53:50 2017
New Revision: 315602
URL: https://svnweb.freebsd.org/changeset/base/315602
Log:
MFC r312942:
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 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:
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 Mon Mar 20 01:19:04 2017 (r315601)
+++ stable/11/sys/sys/cdefs.h Mon Mar 20 01:53:50 2017 (r315602)
@@ -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__))
More information about the svn-src-stable
mailing list