From 50940f0db37ba896934846423ab5bcc228d2e81d Mon Sep 17 00:00:00 2001 From: David Declerck Date: Tue, 17 Oct 2023 16:08:00 +0200 Subject: [PATCH] Minor adjustments --- cobc/codegen.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cobc/codegen.c b/cobc/codegen.c index 746418c90..b1cc553d6 100644 --- a/cobc/codegen.c +++ b/cobc/codegen.c @@ -12602,7 +12602,8 @@ output_internal_function (struct cb_program *prog, cb_tree parameter_list) seen = 0; for (m = literal_cache; m; m = m->next) { - if (m->make_decimal) { + if (CB_TREE_CLASS (m->x) == CB_CLASS_NUMERIC + && m->make_decimal) { if (!seen) { seen = 1; output_line ("/* Set Decimal Constant values */"); @@ -12809,7 +12810,8 @@ output_internal_function (struct cb_program *prog, cb_tree parameter_list) output_line ("P_clear_decimal:"); seen = 0; for (m = literal_cache; m; m = m->next) { - if (m->make_decimal) { + if (CB_TREE_CLASS (m->x) == CB_CLASS_NUMERIC + && m->make_decimal) { if (!seen) { seen = 1; output_line ("/* Clear Decimal Constant values */"); @@ -13930,7 +13932,8 @@ codegen_internal (struct cb_program *prog, const int subsequent_call) struct literal_list* m = literal_cache; int comment_gen = 0; for (; m; m = m->next) { - if (m->make_decimal) { + if (CB_TREE_CLASS (m->x) == CB_CLASS_NUMERIC + && m->make_decimal) { if (!comment_gen) { comment_gen = 1; output_local ("\n/* Decimal constants */\n");