Jump to content
Sign in to follow this  
Guest Joe

type casting warnings

Recommended Posts

Guest Joe

consier the following:

 

int time = 3456;

...

portb = (time / 1000);

 

This will generate a warning "possible truncation bla bla...", i know it will truncate, thanks for telling me, now to stop the compiler complaining, i will explisitly typecast to a char so the compiler knows that i do really want it to truncate:

 

int time = 3456;

...

portb = (char) (time / 1000);

 

Now, the compiler gives one of the most usefull compiler errors that i have ever seen on any compiler anywhere:

 

"General Error"

 

<sarcastic>

Thank-you Mr. Compiler, thats really enlightened me as to what went wrong, from your essay of error text, i can sure figure out why you dont like a simple typecast!

 

</sarcastic>

 

 

And dies.

 

 

:)

Share this post


Link to post
Share on other sites
Guest Pavel

Mr. Compiler doesn't handle typecasts :) Mr. Big Compiler that is in pre-alpha stage does this.

 

Regards,

Pavel

Share this post


Link to post
Share on other sites
Guest Joe

Oh goody, i've been using V5 for 2 days now and have found more than a handfull of bugs with it.

 

When will this alpha-release be on general beta release?

 

I'm pretty good at finding bugs, and just cant wait to rip into it... :P

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...