[SOLVED] Project Setting "Treat 'double' as 'float"

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Project Setting "Treat 'double' as 'float"

    Hello Segger Team,


    How is the Project setting „Treat 'double' as 'float'” working? When enabled it should handle variables of type double as they were float.

    In my tests float is always 32 bits in size, and double 64 bits regardless of how this project option is set. Compare my tiny example.


    Best regards
    Files
    • DoubleAsFloat.7z

      (357.14 kB, downloaded 270 times, last: )
  • Hello,

    Thank you for your inquiry.
    This is unfortunately a deprecated project option which will be removed.
    It was available with gcc in the past, but they removed it form the compiler. Clang never had it.

    Sorry for the confusion.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hello Nino,


    thanks for the clarification.

    I was a bit worried as the default is that doubles are treated as float, and I need to have doubles in my application.

    If I have understood you correctly, this is a dead option without any impact, right?


    Best Regards
  • Hello,

    this is absolutely correct.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.