http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48685
--- Comment #6 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2011-04-22 16:53:53 UTC --- On Fri, 22 Apr 2011, jakub at gcc dot gnu.org wrote: > And it has void_type_node like its argument, which is void_type_node > COND_EXPR. > The second argument of the COND_EXPR is void_type_node also, but the third is > a MODIFY_EXPR and for MODIFY_EXPR fold_convert_loc just refuses to convert it: > 2030 case VOID_TYPE: > 2031 tem = fold_ignored_result (arg); > 2032 if (TREE_CODE (tem) == MODIFY_EXPR) > 2033 goto fold_convert_exit; > 2034 return fold_build1_loc (loc, NOP_EXPR, type, tem); I'd say that's a bug in fold_convert_loc; it should provide the interface to the rest of the compiler that the return value always has the requested type (or is error_mark_node).