diff options
author | Joseph Myers <joseph@codesourcery.com> | 2009-04-08 15:11:46 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2009-04-08 15:11:46 +0100 |
commit | 4d84fe7ceeda4dfa363b4cfe273db99003b87abe (patch) | |
tree | 725240e973ffe286fcab43b5d65f6b5ee8e4b5c2 /gcc/c-parser.c | |
parent | 2db15b1d05e7c42b11a0a7cdff27266189187ea3 (diff) | |
download | gcc-4d84fe7ceeda4dfa363b4cfe273db99003b87abe.zip gcc-4d84fe7ceeda4dfa363b4cfe273db99003b87abe.tar.gz gcc-4d84fe7ceeda4dfa363b4cfe273db99003b87abe.tar.bz2 |
re PR middle-end/39614 (Internal error compiling CSiBE)
PR c/39614
PR c/39673
* c-common.h (C_MAYBE_CONST_EXPR_PRE, C_MAYBE_CONST_EXPR_EXPR,
C_MAYBE_CONST_EXPR_INT_OPERANDS, C_MAYBE_CONST_EXPR_NON_CONST,
EXPR_INT_CONST_OPERANDS): Remove duplicate definitions.
* c-convert.c (convert): Do not call fold on results of conversion
functions when the result is a C_MAYBE_CONST_EXPR.
* c-parser.c (c_parser_postfix_expression): Do not fold condition
of __builtin_choose_expr.
* c-typeck.c (remove_c_maybe_const_expr): New.
(build_unary_op, build_conditional_expr, build_compound_expr,
build_binary_op, c_objc_common_truthvalue_conversion): Call
remove_c_maybe_const_expr on any input C_MAYBE_CONST_EXPR with
integer operands.
testsuite:
* gcc.c-torture/compile/pr39614-1.c,
gcc.c-torture/compile/pr39614-2.c,
gcc.c-torture/compile/pr39614-3.c,
gcc.c-torture/compile/pr39614-4.c,
gcc.c-torture/compile/pr39614-5.c,
gcc.c-torture/compile/pr39673-1.c,
gcc.c-torture/compile/pr39673-2.c: New tests.
* gcc.dg/gnu89-const-expr-2.c, gcc.dg/gnu99-const-expr-2.c: Test
more cases.
* gcc.dg/overflow-warn-1.c, gcc.dg/overflow-warn-2.c,
gcc.dg/overflow-warn-3.c, gcc.dg/overflow-warn-4.c: Update
expected errors.
From-SVN: r145737
Diffstat (limited to 'gcc/c-parser.c')
-rw-r--r-- | gcc/c-parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-parser.c b/gcc/c-parser.c index 1be2ae5..d0b0d77 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -5403,7 +5403,7 @@ c_parser_postfix_expression (c_parser *parser) { tree c; - c = fold (e1.value); + c = e1.value; if (TREE_CODE (c) != INTEGER_CST || !INTEGRAL_TYPE_P (TREE_TYPE (c))) error_at (loc, |