[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-GnuCOBOL] Redefining a redefinition and misleading error message
From: |
Martin Ward |
Subject: |
[Bug-GnuCOBOL] Redefining a redefinition and misleading error message |
Date: |
Mon, 2 Jul 2018 18:42:27 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
If I run cobc on the attached COBOL file I get:
zzz.cbl: 25: error: 'BAR' is not the original definition
zzz.cbl: 22: error: size of 'BAR' larger than size of 'FOO'
I don't know if redefining a redefine is allowed in standard COBOL:
but the second message is definitely incorrect. FOO and BAR
are both 725 bytes long.
If I take out the definition of UID1, then the second message
goes away. UID1 is not part of FOO or BAR.
cobc -std-mf zzz.cbl
does not give any errors.
Output of cobc -V:
cobc (GnuCOBOL) 2.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Keisuke Nishida, Roger While, Ron Norman, Simon Sobisch,
Edward Hart
Built Dec 14 2017 20:42:38
Packaged Sep 06 2017 18:48:43 UTC
C version "4.9.2"
--
Martin
Dr Martin Ward | Email: address@hidden | http://www.gkc.org.uk
G.K.Chesterton site: http://www.gkc.org.uk/gkc | Erdos number: 4
zzz.cbl
Description: Text Data