This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] Why are bools cast to int in conditionals?


On Thu, 22 Apr 2004, Joe Buck wrote:

> This is a case where C and C++ differ.  The type of the != operator is
> bool in C++.

Fold must of course preserve the type of the result of !=.  That doesn't 
mean it can't narrow the operands.

-- 
Joseph S. Myers
jsm@polyomino.org.uk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]