[llvm] fix vs2022 windows compile error: The C++ Standard Library forbids macroizing the keyword "bool" (PR #218842)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 25 23:17:20 PDT 2026
https://github.com/paperplanet created https://github.com/llvm/llvm-project/pull/218842
this patch will fix vs2022 windows compile error: "#error: The C++ Standard Library forbids macroizing the keyword "bool". Enable warning C4005 to find the forbidden define."
>From bf2a7bddd118f3263a8a3b929c3f83254e4bbeb5 Mon Sep 17 00:00:00 2001
From: paperplanet <paperplanet07 at gmail.com>
Date: Wed, 26 Aug 2026 13:42:42 +0800
Subject: [PATCH] fix vs2022 windows compile error: "#error: The C++ Standard
Library forbids macroizing the keyword "bool". Enable warning C4005 to find
the forbidden define."
---
llvm/tools/llvm-c-test/llvm-c-test.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/llvm/tools/llvm-c-test/llvm-c-test.h b/llvm/tools/llvm-c-test/llvm-c-test.h
index 4c5a88ce0447e..c351d233dbbd9 100644
--- a/llvm/tools/llvm-c-test/llvm-c-test.h
+++ b/llvm/tools/llvm-c-test/llvm-c-test.h
@@ -13,6 +13,8 @@
#ifndef LLVM_C_TEST_H
#define LLVM_C_TEST_H
+#define _ALLOW_KEYWORD_MACROS
+
#include <stdbool.h>
#include "llvm-c/Core.h"
More information about the llvm-commits
mailing list