This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 79848

Summary: *Code Model* parsing exception at unsigneg long 18446744073709551615
Product: cnd Reporter: stuav <stuav>
Component: Code ModelAssignee: Vladimir Voskresensky <vv159170>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P2    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: netbeans 5.5b log file

Description stuav 2006-07-07 08:09:36 UTC
Hi i find at parsing process. I use cnd-060615-linux.bin +
netbeans-5_5-beta-linux.bin.

As i can understand exception appeared at parsing 
#    if ULONG_MAX == 18446744073709551615

java dont understand number 18446744073709551615, or 18446744073709551615UL

ps: it is not my code, it from BOOST library.
Comment 1 stuav 2006-07-07 08:10:40 UTC
Created attachment 31682 [details]
netbeans 5.5b log file
Comment 2 Vladimir Voskresensky 2006-07-07 21:34:55 UTC
problem reproduced.
Comment 3 Vladimir Voskresensky 2006-07-25 14:34:18 UTC
For Number exception we should check correctly strings, but for now:
 - workaround. Use Long.MAX_VALUE for overflow values.
Comment 4 Vladimir Kvashin 2006-11-01 09:53:40 UTC
The problem occurs when 64-bit integer value appears in preprocessor conditional
directive. Java integer data types aren't large enough to store such values.

No exception is thrown.

The remaining problem is that some conditionals might be evaluated incorrectly
and thus incorrect conditional branch would be parsed. The given example from
boost works as it should.

The example that doesn't work correct is:

#if __LONG_LONG_MAX__ < 18446744073709551615
void foo32() {
}
#else
void foo64() {
}
#endif

On 32-bit system, it should contain foo32().
Now code model reports foo64().
Comment 5 Jesse Grodnik 2008-05-08 17:16:39 UTC
Escalated to P2
Comment 6 Vladimir Voskresensky 2008-06-18 15:09:29 UTC
The original problem is resolved.
For boost with example like
#if __LONG_LONG_MAX__ == 18446744073709551615
void foo64() {
}
#else
void foo32() {
}
#endif

no any exception and platform is detected correctly

Comment 7 Vladimir Voskresensky 2008-06-18 15:10:33 UTC
the testcase of vkvashin is handled in http://www.netbeans.org/issues/show_bug.cgi?id=137578