Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Codewarrior Embedded > HCS12 Compiler ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 366 of 416
Post > Topic >>

HCS12 Compiler warning

by "msolem" <msolem@[EMAIL PROTECTED] > Dec 15, 2005 at 02:54 PM

I get this warning:

C2705: Possible loss of data.

when compiling this code:

    char var = 8;
    var = var / 2;

If I change var from a char to a short, the warning disappears.
I tried casting the '2' above to char, but that didn't help.
Why am I gettng this warning when using a char?

Mike
 




 4 Posts in Topic:
HCS12 Compiler warning
"msolem" <ms  2005-12-15 14:54:09 
Re: HCS12 Compiler warning
"Gary Schnabl"   2005-12-16 09:12:15 
Re: HCS12 Compiler warning
"msolem" <ms  2005-12-16 08:53:49 
Re: HCS12 Compiler warning
"Gary Schnabl"   2005-12-16 14:58:32 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Oct 12 4:55:53 CDT 2008.