summaryrefslogtreecommitdiff
path: root/gcc/c-lex.c
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2016-03-05 17:30:22 -0800
committerYamaArashi <shadow962@live.com>2016-03-05 17:30:22 -0800
commit1f01ff809a107816317c4ac8a7eff1cbd3700370 (patch)
tree94d195909900f0f3ac91663a431de060e41c7abb /gcc/c-lex.c
parent7d46fa8f8f179c38d1ac777e72a381a46a3c5969 (diff)
make host wide int 32 bits
Diffstat (limited to 'gcc/c-lex.c')
-rwxr-xr-xgcc/c-lex.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index f1e1473..895163f 100755
--- a/gcc/c-lex.c
+++ b/gcc/c-lex.c
@@ -286,25 +286,7 @@ yyprint (file, yychar, yylval)
case CONSTANT:
t = yylval.ttype;
if (TREE_CODE (t) == INTEGER_CST)
- fprintf (file,
-#if HOST_BITS_PER_WIDE_INT == 64
-#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
- " 0x%x%016x",
-#else
-#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
- " 0x%lx%016lx",
-#else
- " 0x%llx%016llx",
-#endif
-#endif
-#else
-#if HOST_BITS_PER_WIDE_INT != HOST_BITS_PER_INT
- " 0x%lx%08lx",
-#else
- " 0x%x%08x",
-#endif
-#endif
- TREE_INT_CST_HIGH (t), TREE_INT_CST_LOW (t));
+ fprintf (file, " " HOST_WIDE_INT_PRINT_DOUBLE_HEX, TREE_INT_CST_HIGH (t), TREE_INT_CST_LOW (t));
break;
}
}
@@ -1887,12 +1869,12 @@ yylex ()
else if (TREE_UNSIGNED (char_type_node)
|| ((result >> (num_bits - 1)) & 1) == 0)
yylval.ttype
- = build_int_2 (result & (~(unsigned HOST_WIDE_INT) 0
+ = build_int_2 (result & (~(HOST_WIDE_UINT) 0
>> (HOST_BITS_PER_WIDE_INT - num_bits)),
0);
else
yylval.ttype
- = build_int_2 (result | ~(~(unsigned HOST_WIDE_INT) 0
+ = build_int_2 (result | ~(~(HOST_WIDE_UINT) 0
>> (HOST_BITS_PER_WIDE_INT - num_bits)),
-1);
TREE_TYPE (yylval.ttype) = integer_type_node;