Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Comipler Bug: Unnessesary cast to type long to for expression of type int
Comipler Bug: Unnessesary cast to type long to for expression of type int [message #86313] Tue, 19 August 2003 08:29 Go to next message
markusle is currently offline markusleFriend
Messages: 12
Registered: July 2009
Junior Member
Hello,

I believe I found an bug in the Java compiler, because:

final long lgLow32BitMask1 = ~(~(long) 0 << 32);
final long lgLow32BitMask2 = ~(~0 << 32);
System.out.println("lgLow32BitMask1: "+lgLow32BitMask1);
System.out.println("lgLow32BitMask2: "+lgLow32BitMask2);

prints out (for SUN JDK 1.4.200):

lgLow32BitMask1: 4294967295
lgLow32BitMask2: 0

and so the warning of the Comipler for the first line (and the assoicated
Quickfix):
Unnessesary cast to type long to for expression of type int
is not good.
I hope this message pleses somebody, if so: Please me and answer to my
postings to this group:

Repost: Message-Box: No user-editable completed tasks to delete
and Message-Box: No user-editable completed tasks to delete

Kind Regards

mle
Re: Comipler Bug: Unnessesary cast to type long to for expression of type int [message #86400 is a reply to message #86313] Tue, 19 August 2003 12:41 Go to previous message
Eclipse UserFriend
Originally posted by: olivier_thomann.ca.ibm.comNOSPAM

Le Tue, 19 Aug 2003 10:29:59 +0200, mle <mle@neze.de> a écrit :
> Unnessesary cast to type long to for expression of type int
>is not good.
Thanks for the report. This bug has been opened:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=41680
You might want to add yourself to CC.
--
Olivier
Previous Topic:Externalize Strings Wizard... any help using some of this functionality?
Next Topic:javanature and .classpath
Goto Forum:
  


Current Time: Thu Dec 26 19:25:30 GMT 2024

Powered by FUDForum. Page generated in 0.02903 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top