Loading ...
Sorry, an error occurred while loading the content.

295Re: [TMS470_ARM] Is char signed or unsigned..??

Expand Messages
  • Rakesh Kumar
    Nov 22, 2010
    • 0 Attachment

      Sorry for the delayed reply mail.

      Actually i am getting the warning (pointer targets in initialization differ in signedness)for below code:
      static const signed char *arr[1] =

      Please let me know how to get rid of this..


      --- On Sat, 11/13/10, Gala Dragos <gala_dragos@...> wrote:

      From: Gala Dragos <gala_dragos@...>
      Subject: Re: [TMS470_ARM] Is char signed or unsigned..??
      To: TMS470_ARM@yahoogroups.com
      Date: Saturday, November 13, 2010, 7:12 PM


      Virtually none !

      signed char definitely defines a char variable with a sign !
      unsigned char definitely creates a char variable without a sign !

      Plain char is treated as signed char in 99% of the cases, but it can be changed to either signed or unsigned at compilation time by the compiler itself ! GCC has a directive to treat all chars as unsigned chars (very useful in 8 bit systems).

      Some warnings do not impede program functions, but every compiler has it's quirks !

      Check your compiler documentation !

      . Microsoft broke the Volkswagen world record: Volkswagen only made 22 million bugs!

      . It is time for us to stand and cheer for the doer, the achiever, the one who recognizes the challenge and does something about it.
      -Vince Lombardi

      . Everybody can learn how to make kids, but not everyone can raise them right!

      From: Rakesh Kumar <rakesh.kumar58@...>
      To: TMS470 <TMS470_ARM@yahoogroups.com>
      Sent: Sat, November 13, 2010 7:00:47 PM
      Subject: [TMS470_ARM] Is char signed or unsigned..??



      what is the difference between plain char and signed char?

      How does below two warnings are related to these distinct data types and how to get rid of these warnings?

      1. pointer targets in initialization differ in signedness

      2. pointer targets don't differ in signedness

      Also is it going to have any impact on instruction set generation..???


    • Show all 5 messages in this topic