[Bug libstdc++/22200] numeric_limitssigned::is_modulo is inconsistend with gcc

2005-06-27 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-27 15:21 --- INT_MAX/-1 is undefined. and signed overflow is undefined. Why file this bug when the comments on the list say this is not a bug? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22200

[Bug libstdc++/22200] numeric_limitssigned::is_modulo is inconsistend with gcc

2005-06-27 Thread veksler at il dot ibm dot com
--- Additional Comments From veksler at il dot ibm dot com 2005-06-27 15:33 --- This is a bug because std::numeric_limitssigned::is_modulo should be true only if singed overflow is defined. This is not the case with gcc, because gcc does not have the extension signed oveflow == module

[Bug libstdc++/22200] numeric_limitssigned::is_modulo is inconsistend with gcc

2005-06-27 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-27 15:40 --- I think we need to read: ISO/IEC 10967-1 Language Independent Arithmetic, part 1 since that is what the standard references for is_modulo. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22200

[Bug libstdc++/22200] numeric_limitssigned::is_modulo is inconsistend with gcc

2005-06-27 Thread gdr at integrable-solutions dot net
--- Additional Comments From gdr at integrable-solutions dot net 2005-06-27 16:06 --- Subject: Re: numeric_limitssigned::is_modulo is inconsistend with gcc pinskia at gcc dot gnu dot org [EMAIL PROTECTED] writes: | INT_MAX/-1 is undefined. | and signed overflow is undefined. | | Why

[Bug libstdc++/22200] numeric_limitssigned::is_modulo is inconsistend with gcc

2005-06-27 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-27 16:07 --- Actually it is modulo for all operations. and INT_MAX/-1 does not raise a trap. -- What|Removed |Added

[Bug libstdc++/22200] numeric_limitssigned::is_modulo is inconsistend with gcc

2005-06-27 Thread gdr at integrable-solutions dot net
--- Additional Comments From gdr at integrable-solutions dot net 2005-06-27 16:09 --- Subject: Re: numeric_limitssigned::is_modulo is inconsistend with gcc pinskia at gcc dot gnu dot org [EMAIL PROTECTED] writes: | I think we need to read: | ISO/IEC 10967-1 Language Independent

[Bug libstdc++/22200] numeric_limitssigned::is_modulo is inconsistend with gcc

2005-06-27 Thread gdr at gcc dot gnu dot org
--- Additional Comments From gdr at gcc dot gnu dot org 2005-06-27 16:21 --- (In reply to comment #1) INT_MAX/-1 is undefined. and signed overflow is undefined. Why file this bug when the comments on the list say this is not a bug? (In reply to comment #5) Actually it is modulo

Re: [Bug libstdc++/22200] numeric_limitssigned::is_modulo is inconsistend with gcc

2005-06-27 Thread Gabriel Dos Reis
pinskia at gcc dot gnu dot org [EMAIL PROTECTED] writes: | Actually it is modulo for all operations. But then do read the comment as far as the loop optimizer is concerned. It does not seem like it understands that it is modulo arithmetic. | and INT_MAX/-1 does not raise a trap. It that is

[Bug libstdc++/22200] numeric_limitssigned::is_modulo is inconsistend with gcc

2005-06-27 Thread gdr at integrable-solutions dot net
--- Additional Comments From gdr at integrable-solutions dot net 2005-06-27 16:25 --- Subject: Re: numeric_limitssigned::is_modulo is inconsistend with gcc pinskia at gcc dot gnu dot org [EMAIL PROTECTED] writes: | Actually it is modulo for all operations. But then do read the

[Bug libstdc++/22200] numeric_limitssigned::is_modulo is inconsistend with gcc

2005-06-27 Thread themis_hv at yahoo dot co dot uk
--- Additional Comments From themis_hv at yahoo dot co dot uk 2005-06-27 16:32 --- (In reply to comment #1) Why file this bug when the comments on the list say this is not a bug? It's for the potentially long debate. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22200

[Bug libstdc++/22200] numeric_limitssigned::is_modulo is inconsistend with gcc

2005-06-27 Thread veksler at il dot ibm dot com
--- Additional Comments From veksler at il dot ibm dot com 2005-06-27 16:35 --- In Comment #5 Andrew Pinski writes: Actually it is modulo for all operations. and INT_MAX/-1 does not raise a trap. That was a typo on my part. It was supposed to be INT_MIN/-1 INT_MAX/-1 does not

Re: [Bug libstdc++/22200] numeric_limitssigned::is_modulo is inconsistend with gcc

2005-06-27 Thread Andrew Pinski
On Jun 27, 2005, at 12:25 PM, gdr at integrable-solutions dot net wrote: | Actually it is modulo for all operations. But then do read the comment as far as the loop optimizer is concerned. It does not seem like it understands that it is modulo arithmetic. But that is because overflow is

[Bug libstdc++/22200] numeric_limitssigned::is_modulo is inconsistend with gcc

2005-06-27 Thread pinskia at physics dot uc dot edu
--- Additional Comments From pinskia at physics dot uc dot edu 2005-06-27 16:53 --- Subject: Re: numeric_limitssigned::is_modulo is inconsistend with gcc On Jun 27, 2005, at 12:25 PM, gdr at integrable-solutions dot net wrote: | Actually it is modulo for all operations. But then

[Bug libstdc++/22200] numeric_limitssigned::is_modulo is inconsistend with gcc

2005-06-27 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-27 17:29 --- (In reply to comment #7) Andrew -- You do not seem to understand this PR. Please DO NOT close it. Your eagerness to close PRs is doing harms -- that was already debated last couple o weeks and I do

[Bug libstdc++/22200] numeric_limitssigned::is_modulo is inconsistend with gcc

2005-06-27 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-27 17:34 --- Invalid as the C++ standard says: True if the type is modulo.203) A type is modulo if it is possible to add two positive numbers and have a result that wraps around to a third number that is less.

[Bug libstdc++/22200] numeric_limitssigned::is_modulo is inconsistend with gcc

2005-06-27 Thread schlie at comcast dot net
--- Additional Comments From schlie at comcast dot net 2005-06-27 18:00 --- (In reply to comment #13) Invalid as the C++ standard says: True if the type is modulo.203) A type is modulo if it is possible to add two positive numbers and have a result that wraps around to a third

[Bug libstdc++/22200] numeric_limitssigned::is_modulo is inconsistend with gcc

2005-06-27 Thread gdr at integrable-solutions dot net
--- Additional Comments From gdr at integrable-solutions dot net 2005-06-27 18:19 --- Subject: Re: numeric_limitssigned::is_modulo is inconsistend with gcc pinskia at physics dot uc dot edu [EMAIL PROTECTED] writes: | Subject: Re: numeric_limitssigned::is_modulo is inconsistend with

[Bug libstdc++/22200] numeric_limitssigned::is_modulo is inconsistend with gcc

2005-06-27 Thread gdr at integrable-solutions dot net
--- Additional Comments From gdr at integrable-solutions dot net 2005-06-27 18:23 --- Subject: Re: numeric_limitssigned::is_modulo is inconsistend with gcc pinskia at gcc dot gnu dot org [EMAIL PROTECTED] writes: | --- Additional Comments From pinskia at gcc dot gnu dot org

[Bug libstdc++/22200] numeric_limitssigned::is_modulo is inconsistend with gcc

2005-06-27 Thread gdr at gcc dot gnu dot org
--- Additional Comments From gdr at gcc dot gnu dot org 2005-06-27 18:25 --- Andrew is being silly. -- What|Removed |Added Status|RESOLVED

[Bug libstdc++/22200] numeric_limitssigned::is_modulo is inconsistend with gcc

2005-06-27 Thread gdr at integrable-solutions dot net
--- Additional Comments From gdr at integrable-solutions dot net 2005-06-27 18:27 --- Subject: Re: numeric_limitssigned::is_modulo is inconsistend with gcc pinskia at gcc dot gnu dot org [EMAIL PROTECTED] writes: | --- Additional Comments From pinskia at gcc dot gnu dot org

[Bug libstdc++/22200] numeric_limitssigned::is_modulo is inconsistend with gcc

2005-06-27 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-27 18:34 --- (In reply to comment #16) Thanks, I'm the author of limits. For all useful purposes, please Andrew go back and read the link I gave to RTH's message. Yes and RTH's comment about trapping is wrong,

[Bug libstdc++/22200] numeric_limitssigned::is_modulo is inconsistend with gcc

2005-06-27 Thread gdr at integrable-solutions dot net
--- Additional Comments From gdr at integrable-solutions dot net 2005-06-27 18:46 --- Subject: Re: numeric_limitssigned::is_modulo is inconsistend with gcc pinskia at gcc dot gnu dot org [EMAIL PROTECTED] writes: | --- Additional Comments From pinskia at gcc dot gnu dot org

[Bug libstdc++/22200] numeric_limitssigned::is_modulo is inconsistend with gcc

2005-06-27 Thread veksler at il dot ibm dot com
--- Additional Comments From veksler at il dot ibm dot com 2005-06-27 20:28 --- (In reply to comment #13) Invalid as the C++ standard says: True if the type is modulo.203) A type is modulo if it is possible to add two positive numbers and have a result that wraps around to a third

[Bug libstdc++/22200] numeric_limitssigned::is_modulo is inconsistend with gcc

2005-06-27 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-27 21:02 --- (In reply to comment #21) 1. Sometimes using undefined simplifies the compiler and improves generated code. 2. (OTOH) Undefind situations are unhelpful the the users, they complicate debugging,

[Bug libstdc++/22200] numeric_limitssigned::is_modulo is inconsistend with gcc

2005-06-27 Thread veksler at il dot ibm dot com
--- Additional Comments From veksler at il dot ibm dot com 2005-06-27 22:00 --- (In reply to comment #22) (In reply to comment #21) 2. (OTOH) Undefind situations are unhelpful the the users, they complicate debugging, and make programming harder. Reducing rules that imply