Possible bug in compiler v5 on PIC24 - float variables
Posted: Sat Jun 21, 2014 1:10 pm
Test done on PIC24FV32KA302.
This simple code was compiled with the version 4 and it has run on the chip correctly, but same code compiled with version 5 return the value two times and cause malfunction of the microcontroller.
The output was read through serial port.
(putting this code into a function)
-----------
float res;
res=3.5;
printf("%.2f\r",res); // to serial port
--------------
compiled with v4 return -> 3.5
compiled with v5 return -> 3.5
3.5
I have checked also with float variable into a function, the compiler v5 caused that the function is called two times.
Could you confirm it is a bug?
Ttelmah
Joined: 11 Mar 2010 Posts: 19540
Posted: Sun Jun 22, 2014 8:58 am
Historically, CCS on several compiler versions has had problems with float formats that do not have a field width. So I'm 'not surprised'. It's far safer to specify a width,
vKadal
Joined: 08 Sep 2009 Posts: 7
Posted: Sun Jun 22, 2014 11:24 am
Kindly report this problem to support@ccsinfo.com. Let them also be aware of this problem
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum