svn commit: r312942 - head/sys/sys
Pedro F. Giffuni
pfg at FreeBSD.org
Sun Jan 29 00:45:53 UTC 2017
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__))
More information about the svn-src-head
mailing list