https://gcc.gnu.org/g:0d9d02d35c64c7d821ca80781ee7360f3f52a0c5
commit r17-4690-g0d9d02d35c64c7d821ca80781ee7360f3f52a0c5 Author: James K. Lowden <[email protected]> Date: Thu Sep 24 17:58:08 2026 -0400 cobol: Correct filename report in default Exception Condition handler. Diagnositic reported current program rather than the one raising the EC. libgcobol/ChangeLog: * libgcobol.cc (default_exception_handler): Use ec_status.source_file. (__gg__move_stash_release): Delete blank line. Diff: --- libgcobol/libgcobol.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libgcobol/libgcobol.cc b/libgcobol/libgcobol.cc index f4bb4c18e702..fec2198ea0fc 100644 --- a/libgcobol/libgcobol.cc +++ b/libgcobol/libgcobol.cc @@ -9922,7 +9922,7 @@ default_exception_handler( ec_type_t ec ) case uc_category_fatal_e: if( filename ) { syslog(priority, "fatal exception: %s:%d: %s %s: %s (%s)", - program_name, + ec_status.source_file, ec_status.lineno, ec_status.statement, filename, // show affected file before EC name @@ -9930,7 +9930,7 @@ default_exception_handler( ec_type_t ec ) pec->description); } else { syslog(priority, "fatal exception: %s:%d: %s: %s (%s)", - program_name, + ec_status.source_file, ec_status.lineno, ec_status.statement, pec->name, @@ -9941,7 +9941,7 @@ default_exception_handler( ec_type_t ec ) case ec_category_nonfatal_e: case uc_category_nonfatal_e: syslog(priority, "%s:%d: %s: %s (%s)", - program_name, + ec_status.source_file, ec_status.lineno, ec_status.statement, pec->name, @@ -13918,4 +13918,3 @@ __gg__move_stash_release(const unsigned char *stash) move_stashes.depth -= 1; } -
