diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-08 14:11:46 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-08 14:11:46 +0000 |
commit | 9a8bed72207df60c60e93fa558732318951a8a96 (patch) | |
tree | 725240e973ffe286fcab43b5d65f6b5ee8e4b5c2 /gcc/c-common.h | |
parent | 326f781ed299d1047cb8697fa0f19e9517d33187 (diff) | |
download | gcc-9a8bed72207df60c60e93fa558732318951a8a96.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145737 138bc75d-0d04-0410-961f-82ee72b054a4
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 0d85a936e72..061cbe3ad0c 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) |