svn commit: r355762 - head/sys/sys

Pedro F. Giffuni pfg at FreeBSD.org
Sun Dec 15 01:56:57 UTC 2019


Author: pfg
Date: Sun Dec 15 01:56:56 2019
New Revision: 355762
URL: https://svnweb.freebsd.org/changeset/base/355762

Log:
  cdefs: use more accurate GCC version for the deprecated attribute.
  
  The message argument in the "deprecated" attribute was introduced in GCC 4.5 *.
  Use the accurate version number for consistency, as done already with other
  attributes.
  
  * https://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/Function-Attributes.html

Modified:
  head/sys/sys/cdefs.h

Modified: head/sys/sys/cdefs.h
==============================================================================
--- head/sys/sys/cdefs.h	Sun Dec 15 01:26:57 2019	(r355761)
+++ head/sys/sys/cdefs.h	Sun Dec 15 01:56:56 2019	(r355762)
@@ -468,7 +468,7 @@
 #define	__hidden
 #endif
 
-#if __GNUC__ > 4 || defined(__clang__)
+#if __GNUC_PREREQ__(4, 5) || defined(__clang__)
 #define	__deprecated(m)	__attribute__((__deprecated__(m)))
 #elif defined(__GNUC__)
 #define	__deprecated(m)	__attribute__((__deprecated__))


More information about the svn-src-all mailing list