Author: pfg Date: Fri Mar 27 02:01:22 2015 New Revision: 280726 URL: https://svnweb.freebsd.org/changeset/base/280726
Log: Fix __size_alloc() Use underscore for the attributes name: this should fix the use of the attributes in macros for lint(1). Suggested by: bde X-MFC with: r280700 Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Fri Mar 27 01:58:44 2015 (r280725) +++ head/sys/sys/cdefs.h Fri Mar 27 02:01:22 2015 (r280726) @@ -212,7 +212,6 @@ #define __unused #define __packed #define __aligned(x) -#define __alloc_size(...) #define __section(x) #define __weak #else @@ -237,11 +236,6 @@ #define __aligned(x) __attribute__((__aligned__(x))) #define __section(x) __attribute__((__section__(x))) #endif -#if __has_attribute(alloc_size) || __GNUC_PREREQ__(4, 3) -#define __alloc_size(...) __attribute__((alloc_size(__VA_ARGS__))) -#else -#define __alloc_size(...) -#endif #if defined(__INTEL_COMPILER) #define __dead2 __attribute__((__noreturn__)) #define __pure2 __attribute__((__const__)) @@ -384,6 +378,12 @@ #define __returns_twice #endif +#if __has_attribute(alloc_size) || __GNUC_PREREQ__(4, 3) +#define __alloc_size(...) __attribute__((__alloc_size__(__VA_ARGS__))) +#else +#define __alloc_size(...) +#endif + /* XXX: should use `#if __STDC_VERSION__ < 199901'. */ #if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER) #define __func__ NULL _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"