On 11/20/14 1:20, Joseph Myers wrote:
> On Wed, 19 Nov 2014, Chen Gang wrote:
> 
>> OK, thanks, what you said sounds reasonable to me. We need '(' and ')'
>> for negative members, and "LL" for the members which is larger than 32
>> bits.
> 
> I don't think LL is a good idea when not needed - quite possibly some of 
> the macros are expected or required to have type int.

OK, thanks. I guess your meaning is:

 - If the value is small enough to be expressed by type 'int', we should
   not provide 'LL'.

 - If the value is positive number, we should not provide '(' and ')'.

If what I guess is correct, I shall try to send patch v2 for it within
this month.

>                                                       Really I think it 
> would be better to require that this function is only used for values that 
> fit in target int (given appropriate checks on all the users to make sure 
> they fit in with that), and put a corresponding assertion there.
> 

Excuse me, I am not quite familiar with "target int", could you provide
more details for it? And if necessary, please help send patch v2 instead
of me:

 - We need provide the best code for upstream. I guess, at present, you
   can, but I can't (I am not quite familiar with the related things).

 - I have planned to send another v2 patches for gcc, and also analyze
   some issues within gcc. I should finish them within this month (it
   seems, at present, I may delay again).

 - If can bear me, still let me send patch for it, I may send patch v2
   in next month.

Thanks.

>> And excuse me, I do not understand why use "(-9223372036854775807LL-1)"
>> instead of "(-9223372036854775808LL)": compiler will report warning for
>> it, but for me, it is more likely the compiler's own issue:
> 
> Because - and 9223372036854775808LL are separate tokens, and the latter is 
> not a valid long long value.
> 

OK, thanks. But for the user (e.g. a normal programmer like me), will
feel that:

 - (-9223372036854775808LL) is a valid value, since it prints correctly.

 - If it is reasonable to report warning for (-9223372036854775808LL),
   why do not also report warning for 0x8000000000000000LL.


Thanks.
-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed

Reply via email to