lilypond-devel
[Top][All Lists]
Advanced

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

Re: Use aligned-on-x-parent instead of other callbacks for some grobs (i


From: dak
Subject: Re: Use aligned-on-x-parent instead of other callbacks for some grobs (issue 127860043 by address@hidden)
Date: Sat, 30 Aug 2014 09:45:02 +0000

On 2014/08/30 09:35:26, J_lowe wrote:
On 2014/08/29 22:21:31, dak wrote:
>
https://codereview.appspot.com/127860043/diff/80001/lily/note-column.cc
> File lily/note-column.cc (right):
>
>

https://codereview.appspot.com/127860043/diff/80001/lily/note-column.cc#newcode167
> lily/note-column.cc:167: Grob *main_head;
> This is a catastrophic error.  If get_stem (me) returns 0 and there
are no
grobs
> in note-heads, main_head is not initialized at all but gets a random
value.
The
> rest of the code more likely than not then calls Grob::extent on
this random
> value.
>
> It would have been easy to notice this error: GCC puts out a quite
accurate
> warning.
>
> Ignoring GCC's warnings is rarely a good idea.

Oh sorry. I would have thought perhaps Patchy would have 'borked' at
some point?

Warnings don't stop the compilation and it would be a bit much to ask
for testers to carefully read through all the log diffs.  It would
probably make sense if warnings stopped the compilation (GCC has an
option for that), but there is one warning from the Bison-generated
parser.cc that would be very hard to get rid of (sort of a Bison bug or
at least annoyance).  Maybe we should just add an exception for
compiling that file and let g++ bomb out on all other warnings.  People
keep writing code triggering warnings without noticing, and I estimate
that probably half of them are not harmless and the others are usually
easy to get rid of, more often than not improving readability.

https://codereview.appspot.com/127860043/



reply via email to

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