Commit Graph

3 Commits

Author SHA1 Message Date
Robert Dubner fba34a0cc5 cobol: Multiple PRs; formatting; exception processing.
The PRs mentined here have either been previously fixed, or are fixed by
this commit.

gcc/cobol/ChangeLog:

	PR cobol/119770
	PR cobol/119772
	PR cobol/119790
	PR cobol/119771
	PR cobol/119810
	PR cobol/119335
	PR cobol/119632
	* cdf-copy.cc (GLOB_BRACE): Eliminate <glob.h>.
	* cdfval.h (_CDF_VAL_H_): Switch to C++ headers.
	* copybook.h (class copybook_elem_t): Eliminate <glob.h>.
	(class copybook_t): Likewise.
	* gcobc: Numerous changes to improve utility.
	* gcobol.1: Correct names in the list of functions.
	* genapi.cc (compare_binary_binary): Use has_attr() function.
	* lexio.cc (cdftext::lex_open): Typo; filename logic.
	(cdftext::process_file): Filename logic.
	* parse.y: Numerous parsing changes.
	* parse_ante.h (new_alphanumeric): C++ includes; changes to temporaries.
	(new_tempnumeric): Likewise.
	(new_tempnumeric_float): Likewise.
	(set_real_from_capacity): Created.
	* scan.l: Use yy_pop_state().
	* scan_ante.h (typed_name): Find figconst from data.initial.
	* symbols.cc (symbol_valid_udf_args): Eliminate.
	(symbols_update): figconst processing.
	(new_temporary_impl): For functions, set .initial to function name.
	(temporaries_t::acquire): Likewise.
	(new_alphanumeric): Likewise.
	(new_temporary): Likewise.
	* symbols.h (_SYMBOLS_H_): Use C++ includes.
	(cbl_figconst_tok): Change handling of figconst.
	(cbl_figconst_field_of): Change handling of figconst.
	(symbol_valid_udf_args): Eliminate.
	* symfind.cc (symbol_match2): Change declaration.
	(symbol_match): Change declaration.

libgcobol/ChangeLog:

	* charmaps.cc: Switch to C++ includes.
	* common-defs.h: Likewise.
	* constants.cc: Likewise.
	* ec.h: Remove #include <assert.h>.
	* gcobolio.h (GCOBOLIO_H_): Switch to C++ includes.
	* gfileio.cc: Likewise.
	* gmath.cc: Likewise.
	* intrinsic.cc: Comment formatting; C++ includes.
	* io.cc: C++ includes.
	* libgcobol.cc: (__gg__stash_exceptions): Eliminate.
	* valconv.cc: Switch to C++ includes.

Co-Authored-By: James K. Lowden <jklowden@cobolworx.com>
2025-05-20 14:24:30 -04:00
Bob Dubner 137e294883 cobol: Confine all __int128/_Float128 references to libgcobol.
These changes are part of the effort to make possible cross compilation for
hosts that don't support __int128 or _Float128.

gcc/cobol

	* Make-lang.in: Eliminate libgcobol.h from gcc/cobol files.
	* genapi.cc: Eliminate "#include libgcobol.h".
	(parser_display_internal): Change comment.
	* genmath.cc: Eliminate "#include libgcobol.h".
	* genutil.cc: Likewise.
	(get_power_of_ten): Change comment.
	* structs.cc: Eliminate cblc_int128_type_node.
	* structs.h: Likewise.
	* symbols.h: Receive comment from libgcobol.h

libgcobol

	* charmaps.cc:Eliminate "#include libgcobol.h".
	Change comment about _Float128.
	* common-defs.h: Change comment about _Float128. Receive
	#defines from libgcobol.h.
	* constants.cc: Eliminate #include libgcobol.h. Eliminate other
	unneeded #includes.
	* ec.h: Receive declarations from libgcobol.h.
	* gcobolio.h: Likewise.
	* gfileio.cc: (__gg__file_init): Use file_flag_none_e instead of
	zero in assignment.  (__gg__file_reopen): Likewise.
	(__io__file_open): Likewise.
	* gfileio.h: Receive declarations from libgcobol.h.
	* libgcobol.h: Numerous declarations moved elsewhere.
2025-03-28 12:21:05 -04:00
James K. Lowden a075418727 COBOL: libgcobol
libgcobol/
	* Makefile.am: New file.
	* Makefile.in: Autogenerate.
	* acinclude.m4: Likewise.
	* aclocal.m4: Likewise.
	* configure.ac: New file.
	* configure: Autogenerate.
	* configure.tgt: New file.
	* README: New file.
	* charmaps.cc: New file.
	* config.h.in: New file.
	* constants.cc: New file.
	* gfileio.cc: New file.
	* gmath.cc: New file.
	* io.cc: New file.
	* valconv.cc: New file.
	* charmaps.h: New file.
	* common-defs.h: New file.
	* ec.h: New file.
	* exceptl.h: New file.
	* gcobolio.h: New file.
	* gfileio.h: New file.
	* gmath.h: New file.
	* io.h: New file.
	* libgcobol.h: New file.
	* valconv.h: New file.
	* libgcobol.cc: New file.
	* intrinsic.cc: New file.
2025-03-11 07:48:15 +01:00