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 CCS Technical Support

Search found 6 matches
CCS Forum Index
Author Message
  Topic: enum syntax error
TonyG

Replies: 8
Views: 11310

PostForum: General CCS C Discussion   Posted: Mon Dec 22, 2008 6:22 pm   Subject: enum syntax error
Dyeatman,

Thanks for the reply. I realize that embedded compilers require adaptations. I've used Keil, IAR, Greenhills, and GNU before, so I'm familiar with these issues. Unfortunately the probl ...
  Topic: enum syntax error
TonyG

Replies: 8
Views: 11310

PostForum: General CCS C Discussion   Posted: Mon Dec 22, 2008 5:38 pm   Subject: Still more!
One of the compilers I'm using supports a pragma statement for specifying structure packing. The statement is: "#pragma pack (1)". This pragma is of course not recognized by the PICC compi ...
  Topic: enum syntax error
TonyG

Replies: 8
Views: 11310

PostForum: General CCS C Discussion   Posted: Mon Dec 22, 2008 5:22 pm   Subject: But wait, there's more!
Here's another compiler error about valid C syntax:

#device PIC18F4520

enum TEST
{
A
} static x = A;

struct TEST_STRUCT
{
int8 x;
} static x = { 0 }; ...
  Topic: enum syntax error
TonyG

Replies: 8
Views: 11310

PostForum: General CCS C Discussion   Posted: Mon Dec 22, 2008 3:58 pm   Subject: Another C syntax problem
I've run into another error with valid C syntax. When I compile this following code:

#device PIC18F4520

int8 Func1(void);

void Func2(void);

int8 Func1(void)
{ ...
  Topic: enum syntax error
TonyG

Replies: 8
Views: 11310

PostForum: General CCS C Discussion   Posted: Mon Dec 22, 2008 3:51 pm   Subject: Intersting addendum
I've noticed that this problem doesn't occur when the enumeration is a return parameter. For example, the following code compiles with no errors:

#device PIC18F4520

enum ABC
{
A, B, C
...
  Topic: enum syntax error
TonyG

Replies: 8
Views: 11310

PostForum: General CCS C Discussion   Posted: Mon Dec 22, 2008 2:50 pm   Subject: enum syntax error
I just started workong on my first project using the PICC compiler (v4.065) integrated with MPLAB (v8.10). I'm trying to compile some code written for previous projects, and I'm running into a proble ...
 
Page 1 of 1
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group