diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-03 18:58:43 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-03 18:58:43 +0000 |
commit | 143d62d7b00994db0ebf403b7bf9c3ce50bfc00f (patch) | |
tree | 8a5a86529d5c77ec43f37dd146c1b7272877a41c /gcc/c-pretty-print.c | |
parent | 90ba46222fda6f62279bd62fca3e236a2caaea46 (diff) | |
download | gcc-143d62d7b00994db0ebf403b7bf9c3ce50bfc00f.tar.gz |
* c-common.c (c_sizeof_or_alignof_type): Use fold_convert instead
of building a NOP_EXPR.
(c_alignof_expr): Likewise. Handle CONVERT_EXPR the same as
NOP_EXPR.
* c-convert.c (convert): Use fold_convert instead of building
NOP_EXPRs and CONVERT_EXPRs directly. Don't special case
c_objc_common_truthvalue_conversion returning a NOP_EXPR. Remove
#if 0 code.
* c-pretty-print.c (pp_c_cast_expression, pp_c_expression): Handle
NOP_EXPR the same as CONVERT_EXPR.
* c-typeck.c (build_function_call): Use fold_convert instead of
building a NOP_EXPR directly.
(build_compound_expr): Handle NOP_EXPR the same as CONVERT_EXPR.
testsuite:
* gcc.dg/cast-pretty-print-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108001 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-pretty-print.c')
-rw-r--r-- | gcc/c-pretty-print.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/c-pretty-print.c b/gcc/c-pretty-print.c index 5e67a96cf4e..6618a70b7b1 100644 --- a/gcc/c-pretty-print.c +++ b/gcc/c-pretty-print.c @@ -1492,6 +1492,7 @@ pp_c_cast_expression (c_pretty_printer *pp, tree e) case FLOAT_EXPR: case FIX_TRUNC_EXPR: case CONVERT_EXPR: + case NOP_EXPR: pp_c_type_cast (pp, TREE_TYPE (e)); pp_c_cast_expression (pp, TREE_OPERAND (e, 0)); break; @@ -1870,6 +1871,7 @@ pp_c_expression (c_pretty_printer *pp, tree e) case FLOAT_EXPR: case FIX_TRUNC_EXPR: case CONVERT_EXPR: + case NOP_EXPR: pp_c_cast_expression (pp, e); break; @@ -1938,7 +1940,6 @@ pp_c_expression (c_pretty_printer *pp, tree e) pp_c_right_paren (pp); break; - case NOP_EXPR: case NON_LVALUE_EXPR: case SAVE_EXPR: pp_expression (pp, TREE_OPERAND (e, 0)); |