From: Robert Dubner Date: Wed, 10 Jun 2026 14:50:02 +0000 (-0400) Subject: cobol: Eliminate "unused function" warning/error. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb46dd58f144ce143238e4f9bc6d8c00edd96dcb;p=thirdparty%2Fgcc.git cobol: Eliminate "unused function" warning/error. gcc/cobol/ChangeLog: * move.cc (parser_move): Don't compile hex_of function. (hex_of): Likewise. (mh_packed_to_packed): Eliminated commented-out calls to hex_of. --- diff --git a/gcc/cobol/move.cc b/gcc/cobol/move.cc index 00d4d5de0b5..8c445cb789d 100644 --- a/gcc/cobol/move.cc +++ b/gcc/cobol/move.cc @@ -2419,6 +2419,8 @@ parser_move(size_t ntgt, cbl_refer_t *tgts, cbl_refer_t src, cbl_round_t rounded } } +#if 0 +// This is a debugging function used from time-to-time static void hex_of(tree location, size_t bytes) { @@ -2428,6 +2430,7 @@ hex_of(tree location, size_t bytes) gg_printf("%2.2X", gg_indirect_i(gg_cast(UCHAR_P, location), i), NULL_TREE); } } +#endif static bool mh_packed_to_packed(const cbl_refer_t &destref, @@ -2520,10 +2523,6 @@ mh_packed_to_packed(const cbl_refer_t &destref, gg_bitwise_and(gg_indirect(source_p), build_int_cst_type(UCHAR, 0x0F))); -// gg_printf("KILROY after rightmost ", NULL_TREE); -// hex_of(shifted_p_left, shifted_size); -// gg_printf("\n", NULL_TREE); - gg_decrement(source_p); gg_decrement(shifted_p_right); WHILE(shifted_p_right, gt_op, shifted_p_left) @@ -2538,10 +2537,6 @@ mh_packed_to_packed(const cbl_refer_t &destref, gg_assign(carry, carry_next); gg_decrement(source_p); gg_decrement(shifted_p_right); - -// gg_printf("KILROY middle ", NULL_TREE); -// hex_of(shifted_p_left, shifted_size); -// gg_printf("\n", NULL_TREE); } WEND // At this point, shifted_p_right equals shifted_p_left @@ -2561,10 +2556,6 @@ mh_packed_to_packed(const cbl_refer_t &destref, carry)); } -// gg_printf("KILROY after leftmost ", NULL_TREE); -// hex_of(shifted_p_left, shifted_size); -// gg_printf("\n", NULL_TREE); - // We now have the left-shifted source in 'shifted'. source_digits += 1; source_rdigits += 1;