[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: |
Thu, 28 Aug 2003 23:26:39 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.2.1) Gecko/20030228 |
=================== BUG #4711: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=4711&group_id=99
Changes by: Adam Fedor <fedor@gnu.org>
Date: Thu 08/28/2003 at 21:26 (US/Mountain)
------------------ Additional Follow-up Comments ----------------------------
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?
=================== BUG #4711: FULL BUG SNAPSHOT ===================
Submitted by: mguesdon Project: GNUstep
Submitted on: Mon 08/11/2003 at 12: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: Thu 08/28/2003 at 21: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: Sat 08/23/2003 at 04: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: Mon 08/11/2003 at 12: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
CC list is empty
No files currently attached
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/