Allow disabling use of __builtin_constant_p in internal macros

Turns out that even in GCC, the expression in `__builtin_cosntant_p`
can end up evaluated and side-effects executed. To allow users to
work around this bug, I added a configuration option to disable its
use in internal macros.

Related to #2925
This commit is contained in:
Martin Hořeňovský
2024-10-27 17:08:47 +01:00
parent 7c2e1fb1b2
commit e260288807
5 changed files with 60 additions and 31 deletions

View File

@@ -44,6 +44,7 @@ set(_OverridableOptions
"WINDOWS_SEH"
"GETENV"
"EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT"
"USE_BUILTIN_CONSTANT_P"
)
foreach(OptionName ${_OverridableOptions})