Date: Thu, 27 Aug 2015 11:04:41 -0500 From: Pedro Giffuni <pfg@FreeBSD.org> To: Alexander Kabaev <kan@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r287206 - head/sys/sys Message-ID: <55DF3519.1000106@FreeBSD.org> In-Reply-To: <201508271400.t7RE0Nbc071389@repo.freebsd.org> References: <201508271400.t7RE0Nbc071389@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello kan; On 08/27/15 09:00, Alexander Kabaev wrote: > Author: kan > Date: Thu Aug 27 14:00:23 2015 > New Revision: 287206 > URL: https://svnweb.freebsd.org/changeset/base/287206 > > Log: > Repair sys/cdefs.h enough to be usable with GCC 5.x > > The __alloc_size and __alloc_align need to be defined to > nothingness for lint, but the existing check is deficient > and allows attributes with working __has_attrubute() to > slip through. > AFAICT GCC hasn't added __has_attribute(), but if they did recently that is great news. > Modified: > head/sys/sys/cdefs.h > .. > #if !__GNUC_PREREQ__(2, 95) > @@ -371,24 +382,12 @@ > #define __returns_twice > #endif > > -#if __has_attribute(alloc_size) || __GNUC_PREREQ__(4, 3) > -#define __alloc_size(x) __attribute__((__alloc_size__(x))) > -#else > -#define __alloc_size(x) > -#endif > - This surely got through in GCC's case through the __GNUC_PREREQ__. Of course gcc 4.2 has neither attribute but clang has alloc_size so I wonder why it hasn't affected the lint builds. Just curiosity, the change is OK but it will be getting ugly if we have to add all the new attributes in the !lint section. Regards, Pedro.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55DF3519.1000106>