From: <no...@so...> - 2000-11-22 10:00:26
|
Bug #119224, was updated on 2000-Oct-25 22:03 Here is a current snapshot of the bug. Project: Tcl Category: Compiler and Objects Status: Open Resolution: None Bug Group: 8.3b2 Priority: 5 Summary: expr and format comands should handle long long (int64) Details: OriginalBugID: 4088 RFE Version: 8.3b2 SubmitDate: '2000-01-26' LastModified: '2000-03-30' Severity: SER Status: Assigned Submitter: techsupp ChangedBy: hobbs OS: Solaris OSVersion: Soalrsi 7 64 bit Machine: Ultra Enterprise 4500 FixedDate: '2000-10-25' ClosedDate: '2000-10-25' Name: matthew Finch DesiredBehavior: Currently tclsh in its current form can only deal with numbers in the form of ints. It would be good and help the project Im working on if expr and format commands could deal with long longs' Currently I am looking at a the mpexpr pkg,but this doesnt take advantage of the byte code compiler I believe I don't know about long long's, but it would be nice to have Tcl at least properly supports longs throughout expressions and in the interpreter. -- 03/30/2000 hobbs Follow-Ups: Date: 2000-Nov-21 05:41 By: dkf Comment: What is the support for 64-bit integer types like across different compilers? I must admit that I don't follow this stuff very closely... ------------------------------------------------------- Date: 2000-Nov-21 10:34 By: hobbs Comment: ANSI C (keyword *ANSI*) has 64 bit integer types as int64_t and uint64_t, but they aren't supported by all ANSI compilers - just those that want to provide 64bit int support. Windows has __int64. Where int64_t isn't yet supported, you might try simulating it with long long. An example that works on Windows, Linux (32-bit PIII) and Solaris (64-bit UltraSparc) is: <PRE> #ifdef _WIN32 #define int64_t __int64 #define uint64_t unsigned __int64 #else #include <sys/types.h> #endif #ifndef int64_t #define int64_t long long #define uint64_t unsigned long long #endif main() { uint64_t i = 0; printf("sizeof int64 = %d\n", sizeof(int64_t)); } </PRE> You can improve on that by actually checking along the way until you get an 8-byte wide integer type instead of making the assumptions. ------------------------------------------------------- Date: 2000-Nov-22 02:00 By: dkf Comment: Wouldn't this be something for configure to discover for us? ------------------------------------------------------- For detailed info, follow this link: http://sourceforge.net/bugs/?func=detailbug&bug_id=119224&group_id=10894 |