aboutsummaryrefslogtreecommitdiff
path: root/gcc/cobol/cobol1.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cobol/cobol1.cc')
-rw-r--r--gcc/cobol/cobol1.cc33
1 files changed, 5 insertions, 28 deletions
diff --git a/gcc/cobol/cobol1.cc b/gcc/cobol/cobol1.cc
index d175ab1..3bd21c7 100644
--- a/gcc/cobol/cobol1.cc
+++ b/gcc/cobol/cobol1.cc
@@ -166,8 +166,8 @@ create_our_type_nodes_init()
long_double_ten_node = build_real_from_int_cst(
LONGDOUBLE,
build_int_cst_type(INT,10));
- sizeof_size_t = build_int_cst_type(SIZE_T, sizeof(size_t));
- sizeof_pointer = build_int_cst_type(SIZE_T, sizeof(void *));
+ sizeof_size_t = build_int_cst_type(SIZE_T, int_size_in_bytes(SIZE_T));
+ sizeof_pointer = build_int_cst_type(SIZE_T, int_size_in_bytes(VOID_P));
bool_true_node = build2(EQ_EXPR,
integer_type_node,
@@ -294,7 +294,7 @@ cobol_langhook_init_options_struct (struct gcc_options *opts) {
cobol_set_debugging( false, false, false );
- copybook_directory_add( getenv("GCOB_COPYBOOK") );
+ copybook_directory_add( getenv("GCOBOL_COPYBOOK") );
}
static unsigned int
@@ -385,10 +385,6 @@ cobol_langhook_handle_option (size_t scode,
return true;
}
- case OPT_fmax_errors:
- flag_max_errors = atoi(arg);
- return true;
-
case OPT_ffixed_form:
cobol_set_indicator_column(-7);
return true;
@@ -413,8 +409,8 @@ cobol_langhook_handle_option (size_t scode,
}
return true;
case OPT_include:
- if( ! include_file_add(cobol_include) ) {
- cbl_errx( "could not include %s", cobol_include);
+ if( ! include_file_add(arg) ) {
+ cbl_errx( "could not include %s", arg);
}
return true;
@@ -646,22 +642,6 @@ cobol_get_sarif_source_language(const char *)
return "cobol";
}
-bool
-cobol_langhook_post_options(const char**)
- {
- // This flag, when set to 0, results in calls to gg_exit working properly.
- // I don't know why it is necessary. There is something going on with the
- // definition of __gg__data_return_code in constants.cc, and with how it
- // is used through var_decl_return_code in genapi.cc. Without it, the value
- // delivered to exit@PLT is zero, and not __gg__data_return_code
- // Dubner, 2025-04-04.
- flag_strict_aliasing = 0;
-
- /* Returning false means that the backend should be used. */
- return false;
- }
-
-
#undef LANG_HOOKS_BUILTIN_FUNCTION
#undef LANG_HOOKS_GETDECLS
#undef LANG_HOOKS_GLOBAL_BINDINGS_P
@@ -676,7 +656,6 @@ cobol_langhook_post_options(const char**)
////#undef LANG_HOOKS_TYPE_FOR_SIZE
#undef LANG_HOOKS_SET_DECL_ASSEMBLER_NAME
#undef LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE
-#undef LANG_HOOKS_POST_OPTIONS
// We use GCC in the name, not GNU, as others do,
// because "GnuCOBOL" refers to a different GNU project.
@@ -702,8 +681,6 @@ cobol_langhook_post_options(const char**)
#define LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE cobol_get_sarif_source_language
-#define LANG_HOOKS_POST_OPTIONS cobol_langhook_post_options
-
struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
#include "gt-cobol-cobol1.h"