Addional compiler options for Clang

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

  • Addional compiler options for Clang

    Hi,

    i switched compiler from gcc to clang. Now we are getting a lot of warnings like :

    "passing 'uint8_t *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign"


    So i was trying to use "/J " compiler switch to handle chars as unsigned. But if i Add "/J" to addional compiler arguments, i always get a Error like:


    "error reading '/J'" :-(
    What can i do?
  • Hi,

    Use -fno-signed-char instead of /J

    Regards
    Johannes
    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.
  • Hi Johannes,

    I tried your solution. The compiler was not complaining about the option anymore. But we still get the warning.
    It seem's the compiler is ignoring the option... or i understand something wrong.

    Please see attached pictures
    Images
    • SEGGER Embedded Studio_compileroption1.png

      29.31 kB, 811×648, viewed 611 times
    • SEGGER Embedded Studio_compileroption2.png

      32.29 kB, 866×769, viewed 587 times
    • SEGGER Embedded Studio_compileroption3.png

      145.44 kB, 1,920×1,040, viewed 613 times