mirror of git://gcc.gnu.org/git/gcc.git
![]() The prior set of changes largely eliminated the assumption that the internal codeset was either ascii or ebcdic. These changes remove the last vestiges of that assumption. These changes also implement the COBOL ENTRY statement, which allows a program-id to have more than one externally callable entry point. Since GCC assumes the existence of an ABI that is not, repeat *not* capable of that, it is implemented here by creating a separate function with the name specified by the ENTRY statement. That function sets up global variables which cause control to be transferred to the ENTRY point when the parent function is called re-entrantly, and then executes that call. gcc/cobol/ChangeLog: * genapi.cc (move_tree): Formatting. (parser_enter_file): Incorporate global __gg__entry_label. (enter_program_common): Remove calls to alphabet overrides. (parser_alphabet): Change cbl_alphabet_e handling. (parser_alphabet_use): Likewise. (initialize_the_data): Likewise. (establish_using): Process passed parameters in a subroutine. (parser_division): Remove in-line parameter processing; call establish_using() instead. Check for __gg__entry_label. (parser_file_add): Temporary workaround for charset encoding. (parser_file_open): Likewise. (create_and_call): Push/pop program state around call to external. (parser_entry): Implement new ENTRY statement feature. (mh_source_is_literalN): Formatting. * genapi.h (parser_entry): New ENTRY statement. * gengen.cc (gg_create_goto_pair): Formatting. (gg_goto_label_decl): Remove. * gengen.h (gg_goto_label_decl): Remove. * genutil.cc (internal_codeset_is_ebcdic): Remove. * genutil.h (internal_codeset_is_ebcdic): Remove. * symbols.cc (symbols_alphabet_set): Restrict alphabet scan to program. * symbols.h (is_elementary): Use defined constants instead of explicit 'A'and 'N' libgcobol/ChangeLog: * charmaps.cc (__gg__set_internal_codeset): Eliminate ascii/ebcdic. (__gg__text_conversion_override): Remove. * charmaps.h (enum text_device_t): Eliminate ascii/ebcdic. (enum text_codeset_t): Remove. (__gg__set_internal_codeset): Remove. (__gg__text_conversion_override): Remove. * gfileio.cc: Anticipate cbl_encoding_t fixes. * libgcobol.cc (struct program_state): Incorporate __gg__entry_label. (__gg__pop_program_state): Eliminate unused defines. (__gg__alphabet_use): Eliminate ascii/ebcdic dichotomy. * valconv.cc (__gg__alphabet_create): Likewise. |
||
---|---|---|
.. | ||
ChangeLog | ||
LICENSE | ||
Makefile.am | ||
Makefile.in | ||
README | ||
acinclude.m4 | ||
aclocal.m4 | ||
charmaps.cc | ||
charmaps.h | ||
common-defs.h | ||
config.h.in | ||
configure | ||
configure.ac | ||
configure.tgt | ||
constants.cc | ||
ec.h | ||
encodings.h | ||
exceptl.h | ||
gcobolio.h | ||
gfileio.cc | ||
gfileio.h | ||
gmath.cc | ||
gmath.h | ||
intrinsic.cc | ||
io.cc | ||
io.h | ||
libgcobol-fp.h | ||
libgcobol.cc | ||
libgcobol.h | ||
libgcobol.spec.in | ||
stringbin.cc | ||
stringbin.h | ||
valconv.cc | ||
valconv.h |
README
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.