[Top][All Lists]

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

Re: Protected_scm warning: returning reference to temporary

From: David Kastrup
Subject: Re: Protected_scm warning: returning reference to temporary
Date: Tue, 14 Jun 2016 00:37:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Dan Eble <address@hidden> writes:

> I noticed these errors building staging in lilydev 3.0:
>> /home/dan/lilypond-git/lily/ In member function
>> 'Protected_scm::operator scm_unused_struct* const&() const':
>> /home/dan/lilypond-git/lily/ warning:
>> returning reference to temporary [enabled by default]

That sounds bad.  The way I read the C++11 standard (but it may not
apply to lilydev 3.0) this should work out, but there is no real reason
not to use an explicit if/then instead of ? : here in order not to rely
on it.

>> /home/dan/lilypond-git/lily/ In member function
>> 'Protected_scm& Protected_scm::operator=(const Protected_scm&)':
>> /home/dan/lilypond-git/lily/ warning:
>> '<anonymous>' may be used uninitialized in this function
>> [-Wuninitialized]
>> /home/dan/lilypond-git/lily/ note:
>> '<anonymous>' was declared here

That's current staging/master?  It would likely be issue 4873 that
caused the change.  I don't remember seeing a similar message on my
computer (native Ubuntu environment rather than lilydev 3.0).

Anyway, I'll push a fix.  Can you check again in 5 minutes?

David Kastrup

reply via email to

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