Simon Sobisch - 2024-02-26

The case of "same definition" may go with -Wredefinition. As noted, the current version of level 78 breaks with GC; if the values are not used and defined multiple times this is output as:

TEST.cob:111: warning: redefinition of 'X-CR' [-Wredefinition]
  109 |       *
  110 |        01  X-LF                            PIC  X(01) VALUE X"0A".
  111 >        01  X-CR                            PIC  X(01) VALUE X"0D".
  112 |       *
TLIB.cpy:19: note: 'X-CR' previously defined here [-Wredefinition]
   17 |            03 X-SOH                   PIC  X(01) VALUE X"01".
   18 |            03 X-LF                    PIC  X(01) VALUE X"0A".
   19 >            03 X-CR                    PIC  X(01) VALUE X"0D".
   20 |            03 X-CRLF                  PIC  X(02) VALUE X"0D0A".

In the case of redefinition (=same VALUE) of constants we can just throw away the second definition, so the use of the constant name will not create an error.