Forum : Ride IDE
Post Information | Post |
---|---|
January 14, 2009 - 7:13am
|
Hi Fellow Programmers: I am getting a compiler warning when I try assign a 1/0 value to a bit (in a structure) based upon a test for the MSB in the right hand side. I am using RIDE-7.14.0001 with RKit-ARM 1.13.0810. Here is my sample code: // test file #define RX_BIT_OVERTEMP 7 // rx bit for over temperature // from stm32f10x_type.h // Head Flags Structure void test_function(void) // set/clear hi-temp bit according to actuator flags bit 7 (gets a warning): |
Hi
Yes I have the same warning which is "overflow in implicit constant conversion".
Matloub
Matloub:
So, can this warning be fixed?
The warning is incorrect, as shown by the two lines of code which follow the warning. There is no overflow. It appears that the GNU compiler is making a mistake by generating this warning.
Thanks,
Garry.