------- Comment #2 from manu at gcc dot gnu dot org 2008-06-08 16:50 ------- In C++ we have:
<ne_expr 0x2aaaab627f00 type <boolean_type 0x2aaaab4fb9c0 bool public unsigned QI size <integer_cst 0x2aaaab4e87b0 constant invariant 8> unit size <integer_cst 0x2aaaab4e87e0 constant invariant 1> align 8 symtab 0 alias set -1 canonical type 0x2aaaab4fb9c0 precision 1 min <integer_cst 0x2aaaab4e8cc0 0> max <integer_cst 0x2aaaab4e8d20 1>> In C we have: <ne_expr 0x2aaaab4c4240 type <integer_type 0x2aaaab4f8540 int public SI size <integer_cst 0x2aaaab4e8a80 constant invariant 32> unit size <integer_cst 0x2aaaab4e86f0 constant invariant 4> align 32 symtab 0 alias set -1 canonical type 0x2aaaab4f8540 precision 32 min <integer_cst 0x2aaaab4e89f0 -2147483648> max <integer_cst 0x2aaaab4e8a20 214748364\ 7> pointer_to_this <pointer_type 0x2aaaab507b40>> Is there are reason for not using boolean_type internally for boolean expressions even in C? A quick hack would be to check the expression and if it boolean, just consider that the expression type is boolean_type. I have seen other bug elsewhere where not using boolean_type causes trouble... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35635