bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #4711] Problem handling/formating long long numbers


From: nobody
Subject: [bug #4711] Problem handling/formating long long numbers
Date: Sat, 23 Aug 2003 06:55:25 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686) Gecko/20030428 Galeon/1.3.3

=================== BUG #4711: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=4711&group_id=99

Changes by: Manuel Guesdon <mguesdon@orange-concept.com>
Date: sam 23.08.2003 à 12:55 (Europe/Paris)

            What     | Removed                   | Added
---------------------------------------------------------------------------
            Severity | 7                         | 5 - Major
           Bug Group | None                      | Bug


------------------ Additional Follow-up Comments ----------------------------
I investigated deeper and found that the problem seems to be not in GSFormat.
configure doesn't define HANDLE_LONG_LONG_MAX because LLONG_MAX is not defined.
LLONG_MAX is defined in limits.h if some compilation directives are defined. 
And in my case, it is not defined.
By using export CPPSFLAGS=gnu99 or CPPSFLAGS=c99, LLONG_MAX is defined so 
HANDLE_LONG_LONG_MAX is defined but now core/base no more compile (Protol 
definition conflict between NSObject.h and 
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2.2/include/objc/objc.h)

Any idea ?



=================== BUG #4711: FULL BUG SNAPSHOT ===================


Soumis par: mguesdon                  Projet: GNUstep                       
Signalé le: lun 11.08.2003 à 20:02
Category:  Base/Foundation            Severity:  5 - Major                  
Bug Group:  Bug                       Resolution:  None                     
Assigned to:  None                    Status:  Open                         

Summary:  Problem handling/formating long long numbers

Original Submission:  Jus try this:

NSNumber* testNumber=[NSNumber numberWithLongLong:3372036854775807LL];

NSDebugMLog(@"testNumber=%@",testNumber);
        ==> -2098855937              (Bad)
      
NSDebugMLog(@"[testNumber longLongValue]=%lld",[testNumber
longLongValue]);
        ==> -2098855937              (Bad)

fprintf(stdour,"[value longLongValue]=%lldn",[value longLongValue]);
        ==> 3372036854775807         (Good)



Follow-up Comments
*******************

-------------------------------------------------------
Date: sam 23.08.2003 à 12:55        By: mguesdon
I investigated deeper and found that the problem seems to be not in GSFormat.
configure doesn't define HANDLE_LONG_LONG_MAX because LLONG_MAX is not defined.
LLONG_MAX is defined in limits.h if some compilation directives are defined. 
And in my case, it is not defined.
By using export CPPSFLAGS=gnu99 or CPPSFLAGS=c99, LLONG_MAX is defined so 
HANDLE_LONG_LONG_MAX is defined but now core/base no more compile (Protol 
definition conflict between NSObject.h and 
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2.2/include/objc/objc.h)

Any idea ?

-------------------------------------------------------
Date: lun 11.08.2003 à 20:18        By: mguesdon
Problem seems to come from GSFormat wich seems to not handle double length 
modifier like hh, ll

There's also a documentation problem in NSNumber.m:
<term> long long</term>
<desc>%li</desc>
is the same as for long (it should be %lli instead of %li).

idem for unsigned long long


La liste CC est vide


Il n'y a aucun fichier attaché actuellement


For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=4711&group_id=99

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]