[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-GnuCOBOL] Binary allocations - -fbinary-size=2-4-8
From: |
Sergey Kashyrin |
Subject: |
Re: [Bug-GnuCOBOL] Binary allocations - -fbinary-size=2-4-8 |
Date: |
Mon, 14 May 2018 18:38:27 -0400 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 |
Hi Folks,
As a fastfix
In field.c in
validate_field_1
...
/* Validate USAGE */
for those:
case CB_USAGE_SIGNED_CHAR:
case CB_USAGE_UNSIGNED_CHAR:
instead of:
f->usage = CB_USAGE_COMP_5;
do:
f->usage = CB_USAGE_BINARY;
(we don't care about byteorder - it is 1 byte)
and then in compute_binary_size change
if(f->flag_real_binary && size <= 2) {
to
if(f->flag_real_binary && size <= 2 && f->usage !=
CB_USAGE_COMP_5) {
I think it should work, even looks not nice :-)
Regards,
Sergey
On 5/14/2018 12:49 PM, Simon Sobisch wrote:
I haven't checked IBMs docs on this but I assume the correct thing to
do for std ibm and bs2000 would be to implement COMP-5 as different
comp type. What does MicroFocus do in ibm mode?
Simon