chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] cast char to unsigned when creating charac


From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH] cast char to unsigned when creating character value
Date: Tue, 21 Feb 2012 19:57:34 +0100
User-agent: Mutt/1.4.2.3i

On Tue, Feb 21, 2012 at 11:30:56AM +0100, Felix wrote:
> The attached patch casts the argument to C_uword in C_make_character,
> as suggested by Joerg Wittenberger and Alan Post to avoid default
> char-signedness issues. Whether this is a genuine problem is not clear
> to me, but not doing so results in code (at least in gcc) that triggers
> a warning in valgrind on 64-bit systems due to uninitialized memory,
> caused by irrational optimization efforts done by contemporary C
> compilers.

Good news!  This patch actually fixes ticket #770; the generated code
is actually fine but the C_make_character got messed up (but only in
some cases, as pointed out by the original poster).

Signed off and pushed.

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                        -- Donald Knuth



reply via email to

[Prev in Thread] Current Thread [Next in Thread]