Problem with STMicroelectronics GNU GCC compiler
Problem with STMicroelectronics GNU GCC compiler
Below partial code of our project.
typedef struct
{
U_16 no;
U_8 duration;
BuzzerSounds buzzerSong;
priorityLevels priority;
TBOOL buzzerPeriodic;
TBOOL isPlayed;
}event;
typedef struct
{
U_32 canID;
U_64 canData;
}canMSG;
typedef enum
{
PRIORITY_BLOCKER = 0,
PRIORITY_HIGH,
PRIORITY_MID,
PRIORITY_LOW,
PRIORITY_TRIVIAL
}priorityLevels;
event eventRecord = {0,0,B_IDLE,255,0,0};
//This red part successfully compiled but not works.
static canMSG msg;
msg.canID = CAN_ID_SETUPREAD | eventDeviceID;
msg.canData = (0x04) + (971uLL << 8) + (((U_64)eventRecord.no) << 32) + (((U_64)eventRecord.duration) << 48) + (((U_64)eventRecord.priority) << 56);
can0SendMessage(msg);
//When i changed red part of code like this, it works.
static canMSG msg;
msg.canID = CAN_ID_SETUPREAD | eventDeviceID;
msg.canData = (0x04);
msg.canData += (971uLL << 8);
msg.canData += (((U_64)eventRecord.no) << 32);
msg.canData += (((U_64)eventRecord.duration) << 48);
msg.canData += (((U_64)eventRecord.priority) << 56);
can0SendMessage(msg);
//Also
when i changed red part of code like this, it works again
static canMSG msg;
msg.canID = CAN_ID_SETUPREAD | eventDeviceID;
msg.canData = (0x04) + (971uLL << 8) + (((U_64)eventRecord.no) << 32) + (((U_64)eventRecord.duration) << 48);
can0SendMessage(msg);
//I think problem is enum part of code.
(((U_64)eventRecord.priority) << 56)
I compile this project with Hightec GCC 4.6.3 toolchain, there is no problem. Red part works normally.
