Jump to content

Recommended Posts

The compiler is compaining about the first typedef enum statement:

 

 

typedef enum tagBSP_EC

{

ECS_OK=0,

//the following are also passed as messages

ECS_FALSE,

ECS_IMAGE_FREED,

ECS_CLIENT_FOUND_SERVER,

ECS_PMT_USER_LIST,

ECS_PMT_OPEN_CONNECTION,

ECS_PMT_CONNECTION_STATE,

ECS_PMT_USER_LOGIN,

 

ECF_FAILED=0x80,

ECF_FAIL,

ECF_NOT_IMPLEMENTED,

ECF_INVALID_ARG,

ECF_EXIT_PROGRAM,

 

} BSP_EC;

 

 

Whilst valid C, is this a current supported feature in V 6.15 ?

 

thanks,

 

Andy

Link to post
Share on other sites
The compiler is compaining about the first typedef enum statement:

 

 

typedef enum tagBSP_EC

{

ECS_OK=0,

//the following are also passed as messages

ECS_FALSE,

ECS_IMAGE_FREED,

ECS_CLIENT_FOUND_SERVER,

ECS_PMT_USER_LIST,

ECS_PMT_OPEN_CONNECTION,

ECS_PMT_CONNECTION_STATE,

ECS_PMT_USER_LOGIN,

 

ECF_FAILED=0x80,

ECF_FAIL,

ECF_NOT_IMPLEMENTED,

ECF_INVALID_ARG,

ECF_EXIT_PROGRAM,

 

} BSP_EC;

 

 

Whilst valid C, is this a current supported feature in V 6.15 ?

 

thanks,

 

Andy

 

 

OK, I found the problem. If the last entry has a trailing comma, then the error message is

 

"error: failure"

 

Unfortunately it gives the line number as the line that has the "typedef enum" statment, and not the last line in the enum declaration that has the extra comma. Incidently, this code compiles fine under gcc-asm, gcc, vc7, vc6 and openwatcom. If nothing else the error line number should be fixed, although I think in general that this is a bug in the parser.

 

Andy

Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...