lilypond-devel
[Top][All Lists]
Advanced

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

Re: Changes to allow compiling with -Werror using gcc 4.6.2 on i386. (is


From: md5i . mail
Subject: Re: Changes to allow compiling with -Werror using gcc 4.6.2 on i386. (issue 5489092)
Date: Tue, 20 Dec 2011 02:12:12 +0000


http://codereview.appspot.com/5489092/diff/1/lily/beaming-pattern.cc
File lily/beaming-pattern.cc (right):

http://codereview.appspot.com/5489092/diff/1/lily/beaming-pattern.cc#newcode187
lily/beaming-pattern.cc:187: I64 count = 1;  //default -- 1 base moments
in a beam
On 2011/12/20 01:54:29, Graham Percival wrote:
huh, I've never encountered I64 before... why does this particular int
need to
be explicitly 64 bits?  If we really can't fit that data into 32 bits,
it would
be nice to add a comment explaining why.
The variable count has to be I64, because it may be set to the result of
test_count, which is I64.  test_count is I64 because tuplet_count is
I64, and tuplet_count is I64 because factor.num() is I64.  In each case,
to use a smaller width could, in theory as far as the compiler is
concerned, truncate a value.  In practice, this almost certainly never
happens.  The alternative is to explicitly cast I64 values to int.  That
may be a better approach, but I prefer to take a conservative approach,
and avoid casts whenever possible.

http://codereview.appspot.com/5489092/



reply via email to

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