c-common.c (c_sizeof_or_alignof_type): Use fold_convert instead of building a NOP_EXPR.
authorJoseph Myers <joseph@codesourcery.com>
Sat, 3 Dec 2005 18:58:43 +0000 (18:58 +0000)
committerJoseph Myers <jsm28@gcc.gnu.org>
Sat, 3 Dec 2005 18:58:43 +0000 (18:58 +0000)
commit4c7a6c1bdb63272d47cbe9aa39b2ee64d3a63fa4
tree8a5a86529d5c77ec43f37dd146c1b7272877a41c
parenta34a91f0b73dad394cd0db44f5702406c09a06c6
c-common.c (c_sizeof_or_alignof_type): Use fold_convert instead of building a NOP_EXPR.

* 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.

From-SVN: r108001
gcc/ChangeLog
gcc/c-common.c
gcc/c-convert.c
gcc/c-pretty-print.c
gcc/c-typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/cast-pretty-print-1.c [new file with mode: 0644]