From 0901f88ad6c9300cb4ff4b255be6dc4b2108788f Mon Sep 17 00:00:00 2001 From: "James K. Lowden" <jklowden@symas.com> Date: Wed, 17 Apr 2024 18:48:10 -0400 Subject: [PATCH] WIP: nist/NC225A fails 2 tests --- gcc/cobol/parse_ante.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/gcc/cobol/parse_ante.h b/gcc/cobol/parse_ante.h index e48035f788fc..c8c8c1b8b467 100644 --- a/gcc/cobol/parse_ante.h +++ b/gcc/cobol/parse_ante.h @@ -322,7 +322,7 @@ struct evaluate_elem_t { : oper(eq_op) , subject(subject) , object(NULL) - , cond( new_temporary(FldConditional) ) + , cond( keep_temporary(FldConditional) ) {} cbl_field_t * object_set( cbl_field_t *obj, relop_t op ) { @@ -372,7 +372,7 @@ void dump() const { explicit evaluate_elem_t( const char skel[] ) : nother(0) - , result( new_temporary(FldConditional) ) + , result( keep_temporary(FldConditional) ) , pcase( cases.end() ) { static const cbl_label_t protolabel = { .type = LblEvaluate }; @@ -743,7 +743,6 @@ static T* use_any( list<T>& src, T *tgt) { } class evaluate_t : public std::list<evaluate_elem_t> { - cbl_field_t *zero_field; public: cbl_label_t *label() { assert(!empty()); return &this->back().label; } @@ -754,9 +753,6 @@ public: } void free() { assert(!empty()); this->pop_back(); } - cbl_field_t *zero( cbl_field_t *z ) { return zero_field = z; } - cbl_field_t *zero() const { return zero_field; } - void dump() const { warnx("last of %zu evaluation elements (line %d):", size(), yylineno); if( !empty() ) back().dump(); @@ -1434,7 +1430,7 @@ static class current_t { static void declarative_execute( cbl_label_t *eval ) { if( !eval ) { if( !enabled_exceptions.empty() ) { - static auto index = new_temporary(FldNumericBin5); + static auto index = keep_temporary(FldNumericBin5); parser_match_exception(index, NULL); } return; -- GitLab