Hello, I made 2 patches for issue #4814 and for a FTBFS witch gcc 6 on Fedora 24. These 2 patches seem to solve that problem for me.
Best regards Guido Aulisi
From 682f75315e6820220ecf45717664f6d32f480c98 Mon Sep 17 00:00:00 2001 From: Guido Aulisi <guido.aul...@gmail.com> Date: Fri, 22 Jul 2016 15:26:29 +0200 Subject: [PATCH 1/2] Avoid segfault in grob.cc with gcc 6 (see issue #4814) When optimizing, GCC 6 now assumes the "this" pointer can never be null, which is guaranteed by the language rules. Programs which assume it is OK to invoke a member function through a null pointer (possibly relying on checks like this != NULL) may crash or otherwise fail at run time if null pointer checks are optimized away. --- lily/grob.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lily/grob.cc b/lily/grob.cc index 7ce89d5..eafa662 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -333,7 +333,7 @@ Real Grob::relative_coordinate (Grob const *refp, Axis a) const { /* eaa - hmmm, should we do a programming_error() here? */ - if ((this == NULL) || (refp == this)) + if (refp == this) return 0.0; /* We catch PARENT_L_ == nil case with this, but we crash if we did @@ -342,7 +342,8 @@ Grob::relative_coordinate (Grob const *refp, Axis a) const if (refp == dim_cache_[a].parent_) return off; - off += dim_cache_[a].parent_->relative_coordinate (refp, a); + if (dim_cache_[a].parent_ != NULL) + off += dim_cache_[a].parent_->relative_coordinate (refp, a); return off; } -- 2.7.4
From 54aef120afc3857fe07971ce0a62cb21426890d0 Mon Sep 17 00:00:00 2001 From: Guido Aulisi <guido.aul...@gmail.com> Date: Fri, 22 Jul 2016 15:32:46 +0200 Subject: [PATCH 2/2] Fix FTBFS with GCC 6. GCC 6 now defaults to -std=gnu++14 instead of -std=gnu++98. Since C++11, the constexpr keyword is needed when initializing a non-integral static data member in a class. --- lily/audio-item.cc | 6 +++--- lily/include/audio-item.hh | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lily/audio-item.cc b/lily/audio-item.cc index 2c5d691..c5b1f87 100644 --- a/lily/audio-item.cc +++ b/lily/audio-item.cc @@ -102,9 +102,9 @@ Audio_key::Audio_key (int acc, bool major) major_ = major; } -const Real Audio_span_dynamic::MINIMUM_VOLUME; -const Real Audio_span_dynamic::MAXIMUM_VOLUME; -const Real Audio_span_dynamic::DEFAULT_VOLUME; +constexpr Real Audio_span_dynamic::MINIMUM_VOLUME; +constexpr Real Audio_span_dynamic::MAXIMUM_VOLUME; +constexpr Real Audio_span_dynamic::DEFAULT_VOLUME; Audio_span_dynamic::Audio_span_dynamic (Moment mom, Real volume) : start_moment_ (mom), diff --git a/lily/include/audio-item.hh b/lily/include/audio-item.hh index 597fa6a..9a2eea0 100644 --- a/lily/include/audio-item.hh +++ b/lily/include/audio-item.hh @@ -48,9 +48,9 @@ private: class Audio_span_dynamic : public Audio_element { public: - static const Real MINIMUM_VOLUME = 0.0; - static const Real MAXIMUM_VOLUME = 1.0; - static const Real DEFAULT_VOLUME = 90.0 / 127.0; + static constexpr Real MINIMUM_VOLUME = 0.0; + static constexpr Real MAXIMUM_VOLUME = 1.0; + static constexpr Real DEFAULT_VOLUME = 90.0 / 127.0; private: Moment start_moment_; -- 2.7.4
_______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel