delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/21/10:29:50

Message-ID: <F77915E7F086D31197F4009027CC81C91CC9FA@probe-2.as-london.acclaim.com>
From: Shawn Hargreaves <SHargreaves AT acclaimstudios DOT co DOT uk>
To: djgpp AT delorie DOT com
Subject: Re: signed - unsigned chars
Date: Fri, 21 Jan 2000 14:13:49 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Reply-To: djgpp AT delorie DOT com

Petr Maxa writes:
> Is there any possibility to change it
> globally signed char to unsigned as in Borland compiler ?

Use the "-funsigned-char" switch. This is documented in
the info page gcc / invoking / c dialect.

But you should be aware that ANSI makes no guarantees about
whether char type is signed or unsigned, so this can vary
across different machines and compilers, and not all systems
have options to change the default. If you care about the
signedness of char variables, it is better to explicitly 
declare them as "signed char" or "unsigned char".


	Shawn Hargreaves.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019