Skip to content

Commit

Permalink
cdefs: use more accurate GCC version for the deprecated attribute.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pgiffuni committed Dec 15, 2019
1 parent 727b66b commit d5dfb2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sys/sys/cdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__))
Expand Down

0 comments on commit d5dfb2f

Please sign in to comment.