https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126540

            Bug ID: 126540
           Summary: cobol1: error: "VALUE is too long to initialize"
                    should possibly silently ignore insignificant data /
                    only raise a warning
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: cobol
          Assignee: unassigned at gcc dot gnu.org
          Reporter: simonsobisch at gnu dot org
  Target Milestone: ---

error: VALUE ‘   ’ is too long to initialize ‘VAR’, discarded ‘  ’
  173 |      77  VAR  PIC X(01) VALUE "   ".


that is only seen on GCC, other compilers seem to silently truncate
insignificant data (leading zeroes for numeric, trailing spaces for
alphanumeric and national), which is especially useful if you use constants in
there.

In any case I wonder if that message - when truncating anything significant -
should be downgraded to a warning (which I think is the case for other
compilers).

Reply via email to