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-common.h | |
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-common.h')
-rw-r--r-- | gcc/c-common.h | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/gcc/c-common.h b/gcc/c-common.h index 0d85a93..061cbe3 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -879,21 +879,6 @@ extern void finish_file (void); || (TREE_CODE (EXPR) == C_MAYBE_CONST_EXPR \ && C_MAYBE_CONST_EXPR_INT_OPERANDS (EXPR)))) -/* C_MAYBE_CONST_EXPR accessors. */ -#define C_MAYBE_CONST_EXPR_PRE(NODE) \ - TREE_OPERAND (C_MAYBE_CONST_EXPR_CHECK (NODE), 0) -#define C_MAYBE_CONST_EXPR_EXPR(NODE) \ - TREE_OPERAND (C_MAYBE_CONST_EXPR_CHECK (NODE), 1) -#define C_MAYBE_CONST_EXPR_INT_OPERANDS(NODE) \ - TREE_LANG_FLAG_0 (C_MAYBE_CONST_EXPR_CHECK (NODE)) -#define C_MAYBE_CONST_EXPR_NON_CONST(NODE) \ - TREE_LANG_FLAG_1 (C_MAYBE_CONST_EXPR_CHECK (NODE)) -#define EXPR_INT_CONST_OPERANDS(EXPR) \ - (INTEGRAL_TYPE_P (TREE_TYPE (EXPR)) \ - && (TREE_CODE (EXPR) == INTEGER_CST \ - || (TREE_CODE (EXPR) == C_MAYBE_CONST_EXPR \ - && C_MAYBE_CONST_EXPR_INT_OPERANDS (EXPR)))) - /* In a FIELD_DECL, nonzero if the decl was originally a bitfield. */ #define DECL_C_BIT_FIELD(NODE) \ (DECL_LANG_FLAG_4 (FIELD_DECL_CHECK (NODE)) == 1) |