gcc/libgcobol
Bob Dubner e70fe5ed46 cobol: Eliminate cobolworx UAT errors when compiling with -Os
Testcases compiled with -Os were failing because static functions and static
variables were being optimized away, because of improper data type casts, and
because strict aliasing (whatever that is) was resulting in some loss of data.
These changes eliminate those known problems.

gcc/cobol

	* cobol1.cc: (cobol_langhook_post_options): Implemented in order to set
	flag_strict_aliasing to zero.
	* genapi.cc: (set_user_status): Add comment.
	(parser_intrinsic_subst): Expand SHOW_PARSE information.
	(psa_global): Change names of return-code and upsi globals,
	(psa_FldLiteralA): Set DECL_PRESERVE_P for FldLiteralA.
	* gengen.cc: (show_type): Add POINTER type.
	(gg_define_function_with_no_parameters): Set DECL_PRESERVE_P for COBOL-
	style nested programs.  (gg_array_of_bytes): Fix bad cast.

libgcobol

	* charmaps.h: Change __gg__data_return_code to 'short' type.
	* constants.cc: Likewise.
2025-04-04 14:09:09 -04:00
..
acinclude.m4
aclocal.m4 libgcobol: Add configure checks for iconv. 2025-03-20 19:50:51 +00:00
ChangeLog Daily bump. 2025-04-04 00:16:45 +00:00
charmaps.cc cobol: Confine all __int128/_Float128 references to libgcobol. 2025-03-28 12:21:05 -04:00
charmaps.h cobol: Eliminate cobolworx UAT errors when compiling with -Os 2025-04-04 14:09:09 -04:00
common-defs.h cobol: Confine all __int128/_Float128 references to libgcobol. 2025-03-28 12:21:05 -04:00
config.h.in libgcobol: Provide fallbacks for C32 strfromf32/64 functions. 2025-04-03 14:33:59 +01:00
configure libgcobol: Provide fallbacks for C32 strfromf32/64 functions. 2025-04-03 14:33:59 +01:00
configure.ac libgcobol: Provide fallbacks for C32 strfromf32/64 functions. 2025-04-03 14:33:59 +01:00
configure.tgt cobol: Fix up libgcobol configure [PR119216] 2025-03-11 14:36:53 +01:00
constants.cc cobol: Eliminate cobolworx UAT errors when compiling with -Os 2025-04-04 14:09:09 -04:00
ec.h cobol: Confine all __int128/_Float128 references to libgcobol. 2025-03-28 12:21:05 -04:00
exceptl.h
gcobolio.h cobol: Confine all __int128/_Float128 references to libgcobol. 2025-03-28 12:21:05 -04:00
gfileio.cc libgcobol: Ensure that config.h is included where needed. 2025-04-03 14:32:27 +01:00
gfileio.h cobol: Confine all __int128/_Float128 references to libgcobol. 2025-03-28 12:21:05 -04:00
gmath.cc libgcobol: Ensure that config.h is included where needed. 2025-04-03 14:32:27 +01:00
gmath.h
intrinsic.cc libgcobol: Only use random_r if it is available [PR119295] 2025-04-03 14:33:27 +01:00
io.cc libgcobol: Ensure that config.h is included where needed. 2025-04-03 14:32:27 +01:00
io.h
libgcobol.cc libgcobol: Provide fallbacks for C32 strfromf32/64 functions. 2025-04-03 14:33:59 +01:00
libgcobol.h cobol: Confine all __int128/_Float128 references to libgcobol. 2025-03-28 12:21:05 -04:00
Makefile.am cobol: Make CXXFLAGS_FOR_TARGET available to the libgcobol build. 2025-03-23 00:00:52 -04:00
Makefile.in cobol: Make CXXFLAGS_FOR_TARGET available to the libgcobol build. 2025-03-23 00:00:52 -04:00
README
valconv.cc libgcobol: Fix uses of tolower and toupper with std::transform 2025-03-26 16:49:11 -04:00
valconv.h

The libgcobol is intended for use entirely and solely by executables created
from COBOL source code by the GCOBOL "COBOL for GCC" front end.

libgcobol.a can be staticly linked in, but it makes for very large binaries. We
tend to use that for debugging the GCOBOL compiler, and not much else

Many of the functions in the library are called by the executable code generated
by the GCOBOL compiler through GIMPLE tags, and thus prototypes -- which are 
part of the C/C++ programming paradigm -- are not used.  Both the calling
program and the called program use the extern "C" construction so that the
linker can find the functions, and they need to agree ahead of time about the
meaning of passed parameters.