diff options
author | Zack Weinberg <zackw@panix.com> | 2016-04-28 11:07:58 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2016-08-03 14:03:46 -0400 |
commit | cab4d74b01320670f57dcf356ff89256f4d2fc12 (patch) | |
tree | 2a043314a5c820767e04a810eff4ecbad70a5a49 /sysdeps/unix/sysv | |
parent | bf91be88ea90c1ea888d5646270d66363389ce96 (diff) | |
download | glibc-cab4d74b01320670f57dcf356ff89256f4d2fc12.tar glibc-cab4d74b01320670f57dcf356ff89256f4d2fc12.tar.gz glibc-cab4d74b01320670f57dcf356ff89256f4d2fc12.tar.bz2 glibc-cab4d74b01320670f57dcf356ff89256f4d2fc12.zip |
Add utility macros for clang detection, and deprecation with messages.
There are three new macros added to features.h and sys/cdefs.h:
* __glibc_clang_prereq: just like __GNUC_PREREQ, but for clang.
* __glibc_clang_has_extension: wraps clang's intrinsic __has_extension.
Writing "#if defined __clang__ && __has_extension (...)" doesn't work,
because compilers other than clang will object to the unknown macro
__has_extension even though they don't need to evaluate it.
Instead, write "#if __glibc_clang_has_extension (...)".
* __attribute_deprecated_msg__(msg): like __attribute_deprecated__, but
if possible, prints a message.
The first two are used to define the third. The third will be used
in subsequent patches.
* include/features.h (__glibc_clang_prereq): New macro.
* misc/sys/cdefs.h (__glibc_clang_has_extension)
(__attribute_deprecated_msg__): New macros.
Diffstat (limited to 'sysdeps/unix/sysv')
0 files changed, 0 insertions, 0 deletions