Thursday, September 21st 2017, 10:45am UTC+2

You are not logged in.

  • Login
  • Register

jenlan

Beginner

Date of registration: Nov 11th 2015

Posts: 9

1

Friday, February 10th 2017, 10:21am

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?

SEGGER - Johannes

Super Moderator

Date of registration: Aug 31st 2012

Posts: 352

2

Friday, February 10th 2017, 11:22am

Hi,

Use -fno-signed-char instead of /J

Regards
Johannes

jenlan

Beginner

Date of registration: Nov 11th 2015

Posts: 9

3

Friday, February 10th 2017, 5:33pm

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
jenlan has attached the following images:
  • SEGGER Embedded Studio_compileroption1.png
  • SEGGER Embedded Studio_compileroption2.png
  • SEGGER Embedded Studio_compileroption3.png