I try to compile the below mentioned code in Code-warrior 10.7 but CW throws an error "illegal constant expression"
Code:
uint32_t val1;
uint32_t val2;
uint32_t val2 = (uint32_t)&val2; // Error is specified in this line
void main(void)
{
. // some code
.
.
}
The expression could work out with pointers but I am importing a code from IAR Embedded Workbench to Code-warrior and in IAR Embedded Workbench there is no such problem with such an expression.
Hello Amit,
The compilers are different ,how about use like below:
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------