From 9519d15c3522be00a3bd1ba8e9694ae2d77a0c36 Mon Sep 17 00:00:00 2001 From: Bob Dubner <rdubner@symas.com> Date: Tue, 24 Dec 2024 15:15:58 -0500 Subject: [PATCH] convert except.cc to cbl_internal_error and cbl_message --- gcc/cobol/ChangeLog | 1 + gcc/cobol/except.cc | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gcc/cobol/ChangeLog b/gcc/cobol/ChangeLog index 9510b3abb8d7..d3b675adc753 100644 --- a/gcc/cobol/ChangeLog +++ b/gcc/cobol/ChangeLog @@ -28,6 +28,7 @@ convert lexio.cc to cbl_warning convert cobol1.cc to cbl_warning convert copybook.h to cbl_warning + convert except.cc to cbl_internal_error and cbl_message diff --git a/gcc/cobol/except.cc b/gcc/cobol/except.cc index 37979a2a9acb..e815a14a60a6 100644 --- a/gcc/cobol/except.cc +++ b/gcc/cobol/except.cc @@ -36,14 +36,14 @@ #include "genapi.h" #include "gengen.h" #include "exceptl.h" +#include "util.h" static const ec_descr_t * ec_type_descr( ec_type_t type ) { auto p = std::find( __gg__exception_table, __gg__exception_table_end, type ); if( p == __gg__exception_table_end ) { - warnx("no such exception: 0x%04x", type); + cbl_internal_error("no such exception: 0x%04x", type); } - assert( p != __gg__exception_table_end ); return p; } @@ -71,12 +71,12 @@ cbl_enabled_exceptions_t enabled_exceptions; void cbl_enabled_exceptions_t::dump() const { if( empty() ) { - warnx( "cbl_enabled_exceptions_t: no exceptions" ); + cbl_message(2, "cbl_enabled_exceptions_t: no exceptions" ); return; } int i = 1; for( auto& elem : *this ) { - warnx( "cbl_enabled_exceptions_t: %2d {%s, %s, %s, %zu}", + cbl_message(2, "cbl_enabled_exceptions_t: %2d {%s, %s, %s, %zu}", i++, elem.enabled? " enabled" : "disabled", elem.location? "location" : " none", -- GitLab