develooper Front page | perl.perl5.porters | Postings from February 2003

Re: How about gcc -funsigned-char [Was: Re: one signedness nit fo r Encode]

From:
Jarkko Hietaniemi
Date:
February 17, 2003 07:13
Subject:
Re: How about gcc -funsigned-char [Was: Re: one signedness nit fo r Encode]
Message ID:
20030217151258.GH16373@kosh.hut.fi
> > Make that declare as 'char' or 'unsigned char' and (cast) as
> > appropriate.  Spelling 'signed char' out in full looks messy.
> 
> But having char as whatever-the-implementation-feels-like may be faster,
> because on platforms where it is much easier to deal with 8 bit unsigned
> quantities than 8 bit signed quantities, the compiler is able to make
> your char (plain char) variables unsigned.

Yes, having that kind of leeway for the compiler (to optimise
speed/size/whatever) is nice-- but I don't remember the standard
legalese what exactly the compiler can do when.

-- 
Jarkko Hietaniemi <jhi@iki.fi> http://www.iki.fi/jhi/ "There is this special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About