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: More front end type mismatch problems


> From: Diego Novillo <dnovillo@redhat.com>
>> On Sat, May 28, 2005 at 01:02:49AM -0400, Paul Schlie wrote:
>> Especially for the purpose of VRP, why wouldn't it be most ideally
>> appropriate to define the result of a comparison to be a _Bool, as it's
>> constrained to the range of 0:1; and by "usual arithmetic conversion",
>> need only typically be promoted to a char rank integer (presuming _Bool
>> is not specified to be of greater rank than char) ...
> Read my original message.  (_Bool)1 + (_Bool)1 is folded to 0.  I
> needed it to be folded to 2.

- Yes thanks; but my point was that the result of comparison should remain
  '_Bool' not 'int', and be properly promoted to likely 'char' not 'int'. As
  for VRP to be most useful it needs to know the minimal precision required.





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