[PATCH vkd3d v2 1/5] vkd3d-shader: Treat undefined identifiers as equal to 0 in #if directives.
Zebediah Figura
zfigura at codeweavers.com
Tue Jan 19 11:18:17 CST 2021
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
libs/vkd3d-shader/preproc.y | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libs/vkd3d-shader/preproc.y b/libs/vkd3d-shader/preproc.y
index f9047c9f..008d01e7 100644
--- a/libs/vkd3d-shader/preproc.y
+++ b/libs/vkd3d-shader/preproc.y
@@ -588,6 +588,11 @@ expr
$$ = preproc_parse_integer($1);
vkd3d_free($1);
}
+ | T_IDENTIFIER
+ {
+ $$ = 0;
+ vkd3d_free($1);
+ }
| T_DEFINED T_IDENTIFIER
{
$$ = !!preproc_find_macro(ctx, $2);
--
2.30.0
More information about the wine-devel
mailing list