* c-common.c (binary_op_error): Do not allow NOP_EXPR.
commitc44afe236f0730770ee0bdecddd7da1c5af78568
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 4 Dec 2005 21:45:41 +0000 (4 21:45 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 4 Dec 2005 21:45:41 +0000 (4 21:45 +0000)
tree09a78feaae42dbb50fdaf694eca604caa1029b35
parent47df1c9677402c981e86b840fac7588edad95afc
* c-common.c (binary_op_error): Do not allow NOP_EXPR.
(c_common_truthvalue_conversion): Handle NOP_EXPR the same as
CONVERT_EXPR.
(check_function_arguments_recurse): Allow both NOP_EXPR and
CONVERT_EXPR but check conversions preserve precision.
* c-typeck.c (pointer_diff): Allow both NOP_EXPR and CONVERT_EXPR
but check conversions preserve precision.
(build_unary_op): Don't allow NOP_EXPR.  Use gcc_unreachable () in
default case.

testsuite:
* gcc.dg/format/cast-1.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108020 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-common.c
gcc/c-typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/format/cast-1.c [new file with mode: 0644]