Jump to content
chuckj

Are Typedef'd Function Pointers Supported?

Recommended Posts

I am having trouble with the following code:

 

#include <system.h>

#include <boostc.h>

 

typedef void ( *X ) ( unsigned char a );

typedef void ( *Y ) ( unsigned char b );

 

X pX;

Y pY;

 

Compiling this code gives error: unknown data type 'Y'

If you comment out the last line, it compiles successfully.

 

If typedef'd funciton pointers are allowed, why is this failing?

 

Thanks!

Share this post


Link to post
Share on other sites

It looks like BoostC doesn't like more than one typedefed FP.

 

Could be a bug there.

 

Cheers

 

Reynard

Share this post


Link to post
Share on other sites

BoostC does support function pointer typedefs. In this particular case because both pointers have same signature compiler wasn't adding the second typedef to its internal lists. This is now fixed and fix will be available in the next release. Thanks for reporting.

 

Regards,

Pavel

Share this post


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...