I try to compile the below mentioned code in Code-warrior 10.7 but CW throws an error "illegal constant expression"
uint32_t val2 = (uint32_t)&val2; // Error is specified in this line
. // 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.