const cdfval_base_t& cdfval_base_t::operator()( const YDFLTYPE& loc ) { static cdfval_t zero(0); return verify_integer(loc, *this) ? *this : zero; }
report:
../../gcc/cobol/cdf.y:897:37: error: Reference to temporary returned. [returnTempReference] return verify_integer(loc, *this) ? *this : zero;
Neither zero nor *this are temporary. cdfval_base_t is the public base class for cdfval_t.
zero
*this
cdfval_base_t
cdfval_t
Can you post a self-contained example that reproduces the error?
Log in to post a comment.
report:
Neither
zero
nor*this
are temporary.cdfval_base_t
is the public base class forcdfval_t
.Can you post a self-contained example that reproduces the error?