[previous] 1275 [next] Suffixed floating constant causes implicit conversion of other (floating) operand.
Arithmetic type - Balancing

A floating constant of type long double is an operand of a balancing operation and is causing the other operand to be implicitly converted to type long double. Is this intended ? Perhaps the suffix on the floating constant is inappropriate ?

For example:


/*PRQA S 2017,3112,3121,3198,3408,3447 ++*/

extern float       fta;
extern double      dba;

extern void foo(void)
{
    fta + 5.0 ;                /* Message 1274 */
    fta + 5.0F;                /*              */

    fta + 5.0L;                /* Message 1275 */
    fta + 5.0F;                /*              */

    dba + 5.0L;                /* Message 1275 */
    dba + 5.0 ;                /*              */
}


No MISRA C:2012 Rules applicable to message 1275


QA·C Source Code Analyser 8.1
MISRA C:2012 Compliance Module 1.0
© 2012 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA C:2012 Rule Index Contents