bug-gnustep
[Top][All Lists]
Advanced

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

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


From: Manuel Guesdon
Subject: [bugs #4711] Problem handling/formating long long numbers
Date: Fri, 28 Nov 2003 13:52:50 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686) Gecko/20030428 Galeon/1.3.3

This mail is an automated notification from the bugs tracker
 of the project: GNUstep.

/**************************************************************************/
[bugs #4711] Latest Modifications:

Changes by: 
                Manuel Guesdon <mguesdon@orange-concept.com>
'Date: 
                ven 28.11.2003 à 19:52 (Europe/Paris)

            What     | Removed                   | Added
---------------------------------------------------------------------------
          Resolution | None                      | Works for me
              Status | Open                      | Declined


------------------ Additional Follow-up Comments ----------------------------
This functionality works as expected.






/**************************************************************************/
[bugs #4711] Full Item Snapshot:

URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=4711>
Project: GNUstep
Submitted by: Manuel Guesdon
On: lun 11.08.2003 à 20:02

Category:  Base/Foundation
Severity:  5 - Average
Item Group:  Bug
Resolution:  Works for me
Assigned to:  None
Status:  Declined


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: ven 28.11.2003 à 19:52        By: mguesdon
This functionality works as expected.

-------------------------------------------------------
Date: ven 29.08.2003 à 05:26        By: fedor
Looks like gcc doesn't define __OBJC__ when compiling an Objective-C file if 
it's using the c99 or gnu99 standard. Probably a compiler bug?

-------------------------------------------------------
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












For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=4711>

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





reply via email to

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