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 > Re: HCS12 Compi...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 4 Topic 366 of 415
Post > Topic >>

Re: HCS12 Compiler warning

by "msolem" <msolem@[EMAIL PROTECTED] > Dec 16, 2005 at 08:53 AM

Ok, that makes sense, thanks.  The warning does disappear if I do this:
var = (char)(var / 2);

But if it's the constant 2 that's causing the promotion, shouldn't this
also compile warning free (which it doesn't):
var = var / (char)2

I see that the HCS12 has no 8 bit divide assembly instruction.  So in
some
sense I guess it gets promoted to 16 bit no matter what.  Is that why
that line still produces the warning?

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 Sep 7 22:41:23 CDT 2008.