Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged revisions 4964-4978, 4980, 4982-4984, 4986, 4988, 4989, 4992, …
…4994-4996, 5003, 5004, 5330 from branches/gnucobol-3.x: ........ Minor adjustments (testsuite, ChangeLog entries, C89) ........ assorted runtime fixes: libcob: * common.c (cob_check_beyond_exit), common.h: fix prototype to match strings * numeric.c (cob_decimal_get_packed): removed code for "huge packed" fields as we don't have packed fields with more than 38 digits * move.c (cob_get_s64_pic9) [COB_EBCDIC_MACHINE]: fix negative sign lookup ........ assorted compiler fixes * codegen.c (output_initial_values): drop wrong init comment * field.c (copy_into_field): set EXTERNAL name if missing * pplex.l, scanner.l: dropped extra line breaks before area_a token * pplex.l (ppinput): * insert "preparse area_a token" in column 1 instead of column 2 to fix terminal-format support * insert it before newlines are added to the beginning of the buffer ........ minor cleanup libcob libcob: * intrinsic.c, numeric.c: explicit check result of mpz_sgn to 0/!0/1/-1 using const where possible * intrinsic.c (cob_intr_random): fix binary end for implicit seed * intrinsic.c (numval): minor optimization for invalid numeric ........ Support EBCDIC symbolic characters in alphanumeric literals for GCOS * Support EBCDIC symbolic characters in alphanumeric literals * Do not error upon symbolic EBCDIC characters in literals for non-GCOS dialects * Honor -febcdic-table when decoding symbolic EBCDIC characters ........ Move syntax checks on literals to a new file syn_literals.at ........ assorted minor compiler fixes cobc: * codegen.c, flag.def [COBC_HAS_CUTOFF_FLAG]: * fix compile errors * output -fif-cutoff to help when available config/rm-strict.conf: enable indirect-redefines as this was added with later RM-COBOL versions configure.ac: minor adjustment for bdb library lookup ........ Refactor read_literal to use an enum for type In cobc/scanner.l (read_literal): refactor to use `enum cb_literal_type` instead of a char* for the type of literal ........ Allow REPLACE between Gcos `CONTROL DIVISION` and the`IDENTIFICATION DIVISION` ........ gcos.words: remove alias VALUES=VALUE, to correctly parse "VALUES ARE" ........ back to 3.2-dev for this branch ........ GnuCOBOL 3.2 release candidate 2 - 20230210 ........ configure.ac, NEWS: updated for 3.2rc-2 update translation files (fr, tr) from TP ........ minor compiler adjustment cobc.c: * field.c (cb_build_field_tree), tree.h, parser.y: pass level number as integer, not as cb_tree * cobc.c (clean_up_intermediates): fix missing move of temporary files when --save-temps=dir is used in combination with -g ........ build environment fixes configure.ac: fixed adjusted hack for AIX 64bit OBJECT_MODE and added 32bit pendant ........ portability and warning fixes cobc: * typeck.c (validate_alphabet): slightly rewritten to fix compiler warnings * config.c, pparse.y (ppp_replace_list_add), reserved.c (is_invalid_word), tree.c, tree.h, typeck.c: minor adjustments to fix compiler warnings * field.c (validate_multi_value, validate_elem_value), parser.y (setup_external_definition): fixed analyzer warnings by switching "for" (hint at "possibly NULL" at start) to "while" libcob: * intrinsic.c (split_around_t): explicit terminate snprintf * termio.c (pretty_display_numeric): fix GCC warning with {{ 0 }} * termio.c (display_alnum_dump): slightly rewritten to fix compiler warnings * cconv.c (cob_load_collation), common.c, intrinisic.c (cob_intr_random), termio.c: minor adjustments to fix compiler warnings ........ build update for json-c configure.ac: search for json-c header in its common default directory json-c/json.h libcob: handle new define HAVE_JSON_C_JSON_H ........ improving performance for PACKED-DECIMAL, BINARY, DISPLAY conversions from/to integer, also fixing sign regression for PACKED-DECIMAL from [r4967] libcob: * numeric.c (cob_decimal_get_packed, cob_decimal_get_display): fix use of mpz_cmp to compare >= 0 (also fixing use on MPIR) * numeric.c (cob_set_packed_int): fix negative sign * move.c (packed_get_long_long): fixed sign regression introduced [r4967] * move.c (cob_get_int, cob_get_llint): handle negative scale for binary fields * move.c (own_byte_memcpy): removed and replaced replaced by memcpy * move.c (cob_packed_get_sign): removed, inlined code in callers * move.c (cob_decimal_get_display): rewritten * move.c (store_common_region): requesting use of registers * move.c (cob_move_packed_to_display): rewritten for performance * move.c (cob_move): prevent conversion to and from cob_decimal for unscaled COB_TYPE_NUMERIC_PACKED, by directly write from integer to packed using (cob_set_packed_int) * move.c (packed_get_long_long): performance improvements * move.c (cob_packed_get_int): minor performance improvements * move.c (packed_get_long_long, display_get_long_long): dropped "cob_" prefix as those are local-only functions heavily extended testsuite for PACKED-DECIMAL ........ several fixes and minor additions cobc: * field.c (copy_into_field, copy_into_field_recursive): fix missing set of flag_is_pointer, fixing TYPEDEF + SAME AS with pointer types * parser.y, reserved.c: add DISPLAY-1 as PENDING, actually pass NATIONAL usage if specified * field.c (compute_size), tree.c (cb_tree_type): handle CB_USAGE_NATIONAL * parser.y, reserved.c: add DATA-POINTER and FUNCTION-POINTER as PENDING * cobc.c (set_picture): output pointer-type in listing if specified * parser.y (rep_name_list): fixed error handling loop * cobc.c (rep_name_list): elide PICTURE string in symbol listing when too long (also fixing a possible SIGSEGV on WIN32) * cobc.h: fixed prototype for cobc_set_listing_header_code, cobc_get_margin_a, cobc_get_margin_b * cobc.c: remove trailing slash from -I and -L as those break some tab-completed command lines and -MD generation * cobc.c [_WIN32, __DJFPP__]: replace forward slash to backslash for -I fixing -MD generation on mingws/msys environments * pplex.l (ppcopy_find_file, ppcopy): replace slash to match system and always place name in buffer to allow this ........ missing testcase adjustment for msgid change in r4970 ........ let testsuite work better outside of GNU/Linux with GCC environment tests/testsuite.src/run_misc.at: fix linking/dlopen issue happening on some systems (mostly win32) in test CALL RETURNING POINTER ........ fix cygwin and win32 false-positives in the testsuite via its setup tests: * atlocal.in, atlocal_valgrind, atlocal_win: do not unset OS as this is an external var we need to keep for win32 * atlocal_valgrind, atlocal_win: added notes for things we explicit don't want to do build/aux: * pre-inst-env.in: export COB_ON_CYGWIN for testsuite checks ........ cleanup of some checks and fixing some msgids, removing unnecessary ones cobc: * help.c (cobc_print_usage): fixed msgid to match bin/cobcrun.c * flag.def: use correct option names in help output * config.def: fixed typos and spacing in msgids * flag.def: removed duplicated msgid - those are printed in help.c only * typeck.c (cb_emit_goto_entry), tree.h, parser.y: dropped duplicated function and msgid, using cb_emit_goto instead * parser.y (_goto_depending), typeck.c (cb_emit_goto): check via use of numeric_identifier in the parser instead of postponed checking * parser.y (assign_clause), typeck.c (cb_check_numeric_value, cb_validate_collating, validate_assign_name, cb_check_integer_value, error_if_not_int_field_or_has_pic_p): dropped very similar msgids using standard ones for the checks * tree.c (get_category_from_arguments, get_number_in_parentheses): msgid related changes * parser.y (usage_clause_screen_report), typeck.c (validate_usage): have REPORT and SCREEN section only expecting the possibly USAGEs instead all removing the need to check for bad USAGE later libcob: * call.c (cob_put_s64_param, cob_put_u64_param): switched to common msgid * common.c (cob_sys_getopt_long_long): lower-case msgid ........ Small cleanup of the testsuite macros syntax ........ [feature-requests:#45] autodetection of fixed/free source format In cobc: * cobc.c (main): initialize cb_config_text_column to 72 to avoid a race condition in config files. * pplex.l (ppopen): try to autodetect the format of a file after checking the BOM of a file * pplex.l (cobc_set_source_format): add new format name "AUTO" to activate auto-detection of file format ........ more work on packed/decimal performance cobc/codeoptim.c: adjusted inline functions (cob_cmp_packed_int, cob_get_packed_int) to use register types and less intermediate values libcob: * numeric.c * (cob_packed_get_sign): move check for COB_FIELD_NO_SIGN_NIBBLE to callers, minor refactoring * (cob_decimal_set_packed, cob_decimal_set_display): minor performance improvements * (cob_decimal_get_packed, cob_decimal_get_display): rewritten to use local buffer and remainder instead of allocating huge string to just peak at the end * common.c (cob_move_packed_to_display, cob_packed_get_int, cob_packed_get_long_long): minor performance improvements and similar code to numeric.c * intrinisic.c (calculate_start_end_for_numval): only skip leading spaces and zeros, but not leading low-values additional: more testsuite cleanup using explicit escaping and less shell code outside of AT_CHECK, partial after Fabrice Le Fessant ........ fixed old trace to be "as expected" in the testsuite (which may was wrong, later check needed) ........ cobc/cobc.c (process_command_line): output ignored -I and -L options when running verbose ........ cobc: * codegen.c: generate field offsets and indexes as long long to fix overflow in (actually unsupported) access to huge tables * cobc.c (process_env_copy_path): changed to do getenv itself and to output ignored entries when running verbose ........
- Loading branch information