Artifacts Associated With Ticket 868467ffffffffff
Ticket change [db4039b116] (rid 107927) by hinteger on 2003-12-31 15:12:43:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
expr does not deliver correct results for <</>>, if the shift count is equal (or greater) the bitcount of an integer. e.g. expr 5>>32 gives 5, instead of expected 0 expr 5>>33 gives 2, instead of expected 0 Ok, as someone said on clt, this isn't covered in C89 Standard too, but do we have to stick to faulty standards, that were set up years ago. For implementing shifts of bit fields wider than int, this is required to work correctly (ok, I could do conditional expr's, but the code gets quite ugly) - foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "hinteger"
- subsystem initialized to: "16. Commands A-H"
- title initialized to: "<</>> x (x>=bitcount of architecture) is wrong"
- type initialized to: "Bug"
Ticket change [d2b8c0627c] (rid 113577) by dkf on 2004-01-01 23:35:50:
- assignee changed to: "msofer"
- foundin changed to: "obsolete: 8.5a0"
- resolution changed to: "Wont Fix"
- status changed to: "Pending"
- subsystem changed to: "47. Bytecode Compiler"
- title changed to: "<</>> x (x>=bitcount of architecture) is wrong"
Ticket change [ce45df6d0d] (rid 96024) by dkf on 2004-01-01 23:35:51:
- closedate changed to: "2004-01-01T16:35:51"
- closer changed to: "dkf"
- icomment:
Logged In: YES user_id=79902 Tcl just fires the value off to the C runtime's standard shifting mechanism, and always has done AFAICT. We don't do range checks on the shift parameter. If it is wrong, it's a compiler, runtime or processor fault. Not closing outright as perhaps this is something we could check for. But I'm not inclined to do anything about it.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
Ticket change [0e1e1a6da0] (rid 94553) by hinteger on 2004-01-08 05:17:32:
- icomment:
Logged In: YES user_id=124720 Regardless who's to blame for that, the result is not correct. I'll take a look at the code and send a patch.
- login: "hinteger"
- mimetype: "text/plain"
- status changed to: "Open"
- username: "hinteger"
- icomment:
Ticket change [786b9a7e60] (rid 89959) by msofer on 2004-01-09 06:02:19:
- assignee changed to: "dkf"
- icomment:
Logged In: YES user_id=148712 assigning to knowledgeable developer ...
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
Ticket change [5362302e2e] (rid 93750) by dkf on 2004-01-09 16:38:21:
- icomment:
Logged In: YES user_id=79902 Which platform is this on BTW? And which compiler was used? I ask because a VC++ 5.2 compiler bug was found recently in the handling of shifts of 64-bit values.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [1ca3ad453b] (rid 90639) by nobody on 2004-01-12 18:38:21:
- icomment:
Logged In: NO this is on linux x86 with gcc 3.2. I got responses on c.l.t., that Standard C89 doesn't define this, so probably any compiler will give us an incorrect result, but ther's no reason to do a shift count check and return 0 in all cases where the shift count is greater or equal bitcount of integer. btw. means >assigning to knowledgeable developer ... there's no need for a patch anymore ? I didn't have time to submit a patch, maybe I'll make it this week I'll , but I can test only on Linux, I don't have a Win* Environment ! Gerhard
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [0439587df3] (rid 119958) by msofer on 2004-01-12 18:56:04:
- icomment:
Logged In: YES user_id=148712 No, it means: when a patch is submitted, it'll get judged by someone who's got a clue ;)
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [5dee912c3d] (rid 115550) by dkf on 2004-06-16 17:36:27:
- title changed to: "large shift ops wrong"
Ticket change [31986afdef] (rid 93451) by dkf on 2004-09-19 01:04:20:
- icomment:
Logged In: YES user_id=79902 Fixed in HEAD.
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Accepted"
- username: "dkf"
- icomment:
Ticket change [5b3b40623f] (rid 118285) by dkf on 2004-09-19 02:25:51:
- closedate changed to: "2004-09-18T19:25:51"
- closer changed to: "dkf"
- icomment:
Logged In: YES user_id=79902 And in 8.4 branch too.
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dkf"
Ticket change [3e9b7b6731] (rid 121300) by dgp on 2004-09-19 05:40:35:
- icomment:
Logged In: YES user_id=80530 patched HEAD fails the following tests on a 64-bit platform: ==== expr-24.5 expr edge cases; shifting FAILED ==== Contents of test case: expr int(5)<<32 ---- Result was: 21474836480 ---- Result should have been (exact matching): 0 ==== expr-24.5 FAILED ==== expr-24.6 expr edge cases; shifting FAILED ==== Contents of test case: expr int(5)<<63 ---- Result was: -9223372036854775808 ---- Result should have been (exact matching): 0 ==== expr-24.6 FAILED
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Remind"
- status changed to: "Open"
- username: "dgp"
- icomment:
Ticket change [ccb565e50f] (rid 95747) by dkf on 2004-09-19 22:05:43:
- closedate changed to: "2004-09-19T15:05:43"
- closer changed to: "dkf"
- icomment:
Logged In: YES user_id=79902 OK, those tests are failing because I'm not very good at writing tests, and not because what they are testing is failing. Silenced.
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dkf"