CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Different levels of indirection
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
newguy



Joined: 24 Jun 2004
Posts: 1903

View user's profile Send private message

PostPosted: Fri Sep 30, 2016 7:49 am     Reply with quote

septillion wrote:
I did not specify the unsigned type because the CCS Help says "Unsigned: Data is always positive. This is the default data type if not specified.". But I agree it's nicer to specify it specifically.


You have to be a little bit careful regarding the types. With the PCB, PCM and PCH compilers (basically PIC10 - PIC18 families), the default for all variables is unsigned. With PCD (PIC24, PIC33), the default is signed. Made for some really weird behaviour when I migrated a project developed using a PIC18 to a dsPIC33. From that point on it became my standard practice to explicitly declare the variable type for every variable I use.

I must admit that the CCS compiler has spoiled me a bit. Earlier this year a Linux project I was supporting was migrated from kernel 3.12.something to 4.0.something (running on a beaglebone black). A program I wrote for the older kernel no longer worked when recompiled using the updated compiler/libraries. Traced the issue back to the compiler not properly dealing with variables smaller than the native width of the processor: 32 bits. Never had that sort of issue with the CCS compiler.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group