On Thu, 13 Dec 2007, Nuno Lucas wrote:
> Explaining a bit more what I had mean, you are doing an 8-bit shift on
> a char. Some compilers will first convert the value to int and then do
> the shift, while others will apply the shift to the 8-bit value
> (meaning the result will always be 0).
>
> I don't know what the C standard says about this, but as I have been
> bitten by this before I always use proper casts to avoid any problems
> on the day I decide to copy/paste some old code.
>
> It's possible you will have no problems with this code, though (maybe
> recent compilers all do the right thing now).
>
>
> Regards,
> ~Nuno Lucas
>

Well I'm pretty sure that it doesn't REALLY work this way, but I didn't 
write that part of code :) Thanks for the warning though ;)

Thanks everyone!

Ivan

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to