Federico Bruni writes:
It's been my experience, over the last decade, or so, that each successive
major gcc release has had much less tolerance for undefined behavior. And
that the correct approach is to fix the undefined behavior. So, if lilypond
is triggering undefined behavior, then that's what needs to be fixed, not
gcc.