This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCSTUDIO-C2000: Compiler (22.6.0) - Error with __fp_single_precision_constant enabled

Part Number: CCSTUDIO-C2000

Platform: CCS 11.1 on Windows 10.

Target: F28379D

Compiler: ti-cgt-c2000_22.6.0.LTS

Flags:
__fp_single_precision_constant
__float_operations_allowed=32

The stlport/s__limit.h file fails with the following #30 floating constant is out of range errors:

"C:/ti/ccs1110/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/include/stlport/s__limits.h", line 516: error #30: floating constant is out of range
    static double (_STLP_CALL min)() _STLP_NOTHROW { return DBL_MIN; }
                                                            ^
 
"C:/ti/ccs1110/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/include/stlport/s__limits.h", line 521: error #30: floating constant is out of range
    { return _STLP_DBL_DENORM_STYLE ? _STLP_PRIV _LimG<bool>::get_D_denormMin() : DBL_MIN; }
                                                                                  ^
 
"C:/ti/ccs1110/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/include/stlport/s__limits.h", line 523: error #30: floating constant is out of range
    static double (_STLP_CALL max)() _STLP_NOTHROW { return DBL_MAX; }

  • Hi,

    Can you share the code? What are the values that are being assigned?

    -Shantanu

  • Shantanu,

    I am sorry for being unclear.

    This is the stlport that comes with the compiler tools - check the path of the file of the error: 

    "C:/ti/ccs1110/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/include/stlport/s__limits.h",

    line 516: error #30: floating constant is out of range
        static double (_STLP_CALL min)() _STLP_NOTHROW { return DBL_MIN; }

  • Hi,

    I understand the error but can you share the code snippet, values and compiler option so i can reproduce it at my end?

    _Shantanu

  • Shanty,

    I just spent some time trying to get STL port to work on a fresh project with EABI but, could not get it to compile at all, I am no help here.

    My unfortunately export-controlled project uses string and vector from STL port. I can make that error appear by enabling the __fp_single_precision_constant flag and disappear when disabling it.

  • This looks like a compiler related issue. Will re - assign to an expert. Please wait for a day for them to get back to you.

  • Thank you for notifying us of this issue.  I am able to reproduce the behavior.  I filed EXT_EP-10848 to have this investigated.  You are welcome to follow it with that link.  

    The best workaround for now is to avoid using the compiler option --fp_single_precision_constant.

    For those who are following along ... I was able to reproduce the behavior based only on the customer's description.  Please understand this is a rare event.  It is almost always the case that, to reproduce the behavior, a test case must be obtained.

    Thanks and regards,

    -George