[Bug 57194] Re: [Egdy] gcc has a strange behaviour -2 > 0 ?

2006-08-22 Thread Andreas Simon
It just wanted to add that when extracting the arithmetic and comparision code from above it works as expected: $ cat test.cpp #include int main() { int a = 2147483647; int b = 2147483647; int sum = a + b; std::cout << "sum = " << sum << '\n'; if (sum < 0

[Bug 57194] Re: [Egdy] gcc has a strange behaviour -2 > 0 ?

2006-08-22 Thread Christophe Dumez
Yes I tried the same test as you on my computer and it passed successfuly too. I don't know what is different in the code of libtorrent... -- [Egdy] gcc has a strange behaviour -2 > 0 ? https://launchpad.net/bugs/57194 -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubunt

[Bug 57194] Re: [Egdy] gcc has a strange behaviour -2 > 0 ?

2006-09-24 Thread Matthias Klose
No bug. Signed int have no defined overflow behaviour. You have to use unsigned int. ** Changed in: gcc-defaults (Ubuntu) Assignee: (unassigned) => Matthias Klose Status: Unconfirmed => Rejected -- [Egdy] gcc has a strange behaviour -2 > 0 ? https://launchpad.net/bugs/57194 -- ubun

[Bug 57194] Re: [Egdy] gcc has a strange behaviour -2 > 0 ?

2006-08-22 Thread Andreas Simon
It just wanted to add that when extracting the arithmetic and comparision code from above it works as expected: $ cat test.cpp #include int main() { int a = 2147483647; int b = 2147483647; int sum = a + b; std::cout << "sum = " << sum << '\n'; if (sum < 0

[Bug 57194] Re: [Egdy] gcc has a strange behaviour -2 > 0 ?

2006-08-22 Thread Christophe Dumez
Yes I tried the same test as you on my computer and it passed successfuly too. I don't know what is different in the code of libtorrent... -- [Egdy] gcc has a strange behaviour -2 > 0 ? https://launchpad.net/bugs/57194 -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubunt

[Bug 57194] Re: [Egdy] gcc has a strange behaviour -2 > 0 ?

2006-09-24 Thread Matthias Klose
No bug. Signed int have no defined overflow behaviour. You have to use unsigned int. ** Changed in: gcc-defaults (Ubuntu) Assignee: (unassigned) => Matthias Klose Status: Unconfirmed => Rejected -- [Egdy] gcc has a strange behaviour -2 > 0 ? https://launchpad.net/bugs/57194 -- ubun

[Bug 57194] Re: [Egdy] gcc has a strange behaviour -2 > 0 ?

2006-08-22 Thread Andreas Simon
It just wanted to add that when extracting the arithmetic and comparision code from above it works as expected: $ cat test.cpp #include int main() { int a = 2147483647; int b = 2147483647; int sum = a + b; std::cout << "sum = " << sum << '\n'; if (sum < 0

[Bug 57194] Re: [Egdy] gcc has a strange behaviour -2 > 0 ?

2006-08-22 Thread Christophe Dumez
Yes I tried the same test as you on my computer and it passed successfuly too. I don't know what is different in the code of libtorrent... -- [Egdy] gcc has a strange behaviour -2 > 0 ? https://launchpad.net/bugs/57194 -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubunt

[Bug 57194] Re: [Egdy] gcc has a strange behaviour -2 > 0 ?

2006-09-24 Thread Matthias Klose
No bug. Signed int have no defined overflow behaviour. You have to use unsigned int. ** Changed in: gcc-defaults (Ubuntu) Assignee: (unassigned) => Matthias Klose Status: Unconfirmed => Rejected -- [Egdy] gcc has a strange behaviour -2 > 0 ? https://launchpad.net/bugs/57194 -- ubun

[Bug 57194] Re: [Egdy] gcc has a strange behaviour -2 > 0 ?

2006-08-22 Thread Andreas Simon
It just wanted to add that when extracting the arithmetic and comparision code from above it works as expected: $ cat test.cpp #include int main() { int a = 2147483647; int b = 2147483647; int sum = a + b; std::cout << "sum = " << sum << '\n'; if (sum < 0

[Bug 57194] Re: [Egdy] gcc has a strange behaviour -2 > 0 ?

2006-08-22 Thread Christophe Dumez
Yes I tried the same test as you on my computer and it passed successfuly too. I don't know what is different in the code of libtorrent... -- [Egdy] gcc has a strange behaviour -2 > 0 ? https://launchpad.net/bugs/57194 -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubunt

[Bug 57194] Re: [Egdy] gcc has a strange behaviour -2 > 0 ?

2006-09-24 Thread Matthias Klose
No bug. Signed int have no defined overflow behaviour. You have to use unsigned int. ** Changed in: gcc-defaults (Ubuntu) Assignee: (unassigned) => Matthias Klose Status: Unconfirmed => Rejected -- [Egdy] gcc has a strange behaviour -2 > 0 ? https://launchpad.net/bugs/57194 -- ubun

[Bug 57194] Re: [Egdy] gcc has a strange behaviour -2 > 0 ?

2006-08-22 Thread Andreas Simon
It just wanted to add that when extracting the arithmetic and comparision code from above it works as expected: $ cat test.cpp #include int main() { int a = 2147483647; int b = 2147483647; int sum = a + b; std::cout << "sum = " << sum << '\n'; if (sum < 0

[Bug 57194] Re: [Egdy] gcc has a strange behaviour -2 > 0 ?

2006-08-22 Thread Christophe Dumez
Yes I tried the same test as you on my computer and it passed successfuly too. I don't know what is different in the code of libtorrent... -- [Egdy] gcc has a strange behaviour -2 > 0 ? https://launchpad.net/bugs/57194 -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubunt

[Bug 57194] Re: [Egdy] gcc has a strange behaviour -2 > 0 ?

2006-09-24 Thread Matthias Klose
No bug. Signed int have no defined overflow behaviour. You have to use unsigned int. ** Changed in: gcc-defaults (Ubuntu) Assignee: (unassigned) => Matthias Klose Status: Unconfirmed => Rejected -- [Egdy] gcc has a strange behaviour -2 > 0 ? https://launchpad.net/bugs/57194 -- ubun

[Bug 57194] Re: [Egdy] gcc has a strange behaviour -2 > 0 ?

2006-08-22 Thread Andreas Simon
It just wanted to add that when extracting the arithmetic and comparision code from above it works as expected: $ cat test.cpp #include int main() { int a = 2147483647; int b = 2147483647; int sum = a + b; std::cout << "sum = " << sum << '\n'; if (sum < 0

[Bug 57194] Re: [Egdy] gcc has a strange behaviour -2 > 0 ?

2006-08-22 Thread Christophe Dumez
Yes I tried the same test as you on my computer and it passed successfuly too. I don't know what is different in the code of libtorrent... -- [Egdy] gcc has a strange behaviour -2 > 0 ? https://launchpad.net/bugs/57194 -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubunt

[Bug 57194] Re: [Egdy] gcc has a strange behaviour -2 > 0 ?

2006-09-24 Thread Matthias Klose
No bug. Signed int have no defined overflow behaviour. You have to use unsigned int. ** Changed in: gcc-defaults (Ubuntu) Assignee: (unassigned) => Matthias Klose Status: Unconfirmed => Rejected -- [Egdy] gcc has a strange behaviour -2 > 0 ? https://launchpad.net/bugs/57194 -- ubun