Commit 0d1fef41 authored by Andre Hartmann's avatar Andre Hartmann Committed by André Hartmann

C++ Disable bool keywords in C files

The keywords bool, true, and false don't exist in C90.

When using C99 and stdbool.h, they are defined as macros.

Amends commit 7b2c09a1

Change-Id: I2f2391dd11be841d7d7b249db0b4add8523e53a5
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent 5d97c487
......@@ -99,7 +99,7 @@ static inline int classify4(const char *s, LanguageFeatures features)
}
}
}
else if (s[0] == 'b') {
else if (features.cxxEnabled && s[0] == 'b') {
if (s[1] == 'o') {
if (s[2] == 'o') {
if (s[3] == 'l') {
......@@ -173,7 +173,7 @@ static inline int classify4(const char *s, LanguageFeatures features)
}
}
}
else if (s[1] == 'r') {
else if (features.cxxEnabled && s[1] == 'r') {
if (s[2] == 'u') {
if (s[3] == 'e') {
return T_TRUE;
......@@ -255,7 +255,7 @@ static inline int classify5(const char *s, LanguageFeatures features)
}
}
}
else if (s[0] == 'f') {
else if (features.cxxEnabled && s[0] == 'f') {
if (s[1] == 'a') {
if (s[2] == 'l') {
if (s[3] == 's') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment