gemrb
gemrb copied to clipboard
Investigate behavior of `__GNUC__` macro
Assumptions:
-
It's not clear if
__GNUC__
is defined if you disable GNU extensions even if your compiler supports it. maybe we should open an issue to figure out what we really ought to be doing for these checks. -
It is not defined for
Clang
if it is set up forMSVC
(Windows)
Originally posted by @bradallred in https://github.com/gemrb/gemrb/pull/1969#discussion_r1433162057
If we want to avoid using it, it's as simple as adding 5 more cmake tests for compiler features. Namely:
-
__attribute__ ((deprecated
-
__attribute__ ((visibility
-
__attribute__ ((warn_unused_result))
-
__attribute__ ((sentinel))
-
__attribute__ ((unused))