Jump to content

Question About This Compiler Error

Recommended Posts

The following line of code used to compile fine:


unsigned char *pFrame = (unsigned char *)&(txFrame.destAddrHi);


I always put brackets around expressions that I'll take the address of. It's just a habit and I don't want to worry about operator precedence.


After upgrading to 7.11, that line of code produces the following errors:


error: failed to generate expression

error: error in expression


The error can be avoided by taking out one pair of brackets. I have to do this in hundreds of places :-(


unsigned char *pFrame = (unsigned char *)&txFrame.destAddrHi;


However, I think the original code is syntactically correct.


Anyone care to comment?

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.

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.

  • Create New...