Commit Graph

2 Commits

Author SHA1 Message Date
Lasse Collin 34aa4725ed Build: Add a check for __attribute__((__always_inline__)).
All even remotely relevant GCC and Clang versions support this
attribute. The test is useful to detect support in compilers that
don't define __GNUC__ or __clang__, for example, Solaris Studio.
2023-10-22 21:16:12 +03:00
Lasse Collin 4a1ef58ae7 CMake: Check for func attributes without -Werror.
This matches the modified m4/ax_gcc_func_attribute.m4.
Only constructor and ifunc attribute checks were implemented.

CMake-based build doesn't have the trouble of Autoconf confdefs.h
but writing warning-free tests would still some extra care.
If looking for attribute-related warnings works well enough then
this method should be nicer than the -Werror method in CMake too.
2023-10-22 21:16:12 +03:00