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

            Bug ID: 126542
           Summary: cobol1 lexer issue with tabs (or related to level
                    numbers in fixed-format?)
           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: ---

Given the following example

       01.
         05 S-MINM           PIC S9(06)V9(07).
         05 S-GEWM           PIC S9(06)V9(07).
         05 S-MAXM           PIC S9(06)V9(07).

the second data-item in the record is not defined.

Note that the first and third have 9 spaces in front of them, the second has
one tab and one space.

The parsing of this item has no warnings or errors.

if the (default) tab-size would be >=7, then that should be no problem at all;
if the tab-size would be 4, then the line is a continuation line (- in col 7)
and is invalid, should raise an error;
if the tab size is anything else, then the indicator column has invalid data,
which should at least raise a warning (and the code in that line as given would
then again be an error)

Reply via email to