__builtin_choose_expr is not evaluated in constant contexts #8294
Labels
bug
fixed
Check the Milestone for the release in which the fix is or will be available.
Language Service
Visual Studio
Inherited from Visual Studio
Milestone
Bug type: Language Service
Describe the bug
The following code sample produces bogus warnings that neither gcc or clang produce when compiling. The macro is from systemd and is designed to give a compiler error if the expression cannot be evaluated at compile time.
variable may not be initialized
andincomplete type is not allowed
warnings for botharray2
andarray3
despite the fact that the expression is/must be evaluated at compile time (which is kind of the whole point of__builtin_choose_expr
).The text was updated successfully, but these errors were encountered: