aboutsummaryrefslogtreecommitdiff
path: root/libcpp/expr.c
diff options
context:
space:
mode:
authorMichael Meissner <meissner@linux.vnet.ibm.com>2011-03-21 16:21:30 +0000
committerMichael Meissner <meissner@linux.vnet.ibm.com>2011-03-21 16:21:30 +0000
commit11bdc27dabeee5198f1bdf43dd4f5441215d0a08 (patch)
treea11038042e07218234e45c1da1c876bdbdf8c2d5 /libcpp/expr.c
parent085706c8b02ff43cabd456075e1e61a07dc09522 (diff)
Make UNSPEC/UNSPECV constants use the enum; Fix 48192; Add test case for 48053
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@171247 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/expr.c')
-rw-r--r--libcpp/expr.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libcpp/expr.c b/libcpp/expr.c
index d2fec2a56a6..3c36127b54f 100644
--- a/libcpp/expr.c
+++ b/libcpp/expr.c
@@ -720,10 +720,15 @@ parse_defined (cpp_reader *pfile)
pfile->state.prevent_expansion--;
+ /* Do not treat conditional macros as being defined. This is due to the
+ powerpc and spu ports using conditional macros for 'vector', 'bool', and
+ 'pixel' to act as conditional keywords. This messes up tests like #ifndef
+ bool. */
result.unsignedp = false;
result.high = 0;
result.overflow = false;
- result.low = node && node->type == NT_MACRO;
+ result.low = (node && node->type == NT_MACRO
+ && (node->flags & NODE_CONDITIONAL) == 0);
return result;
}