Menu ▾ ▴

#738 access to Level-88 declaration in Typedef not possible

GC 3.x
accepted
5 - default
2026-07-01
2021-06-22
No

Hi GnuCOBOL team,

if you define a typdef with level 88 it's not possible to access this field in procedure division.

You got an error at compile time:

Please take a look in the attached testcase while using command:

cobc -x tc4156.cbl

Kind regards

Sebastian Steinweg
Easirun Europa GmbH

2 Attachments

Related

Discussion: Issue with types and constant entries

Discussion

  • Simon Sobisch

    Simon Sobisch - 2022-12-31
    • labels: --> cobc, TYPEDEF
    • status: open --> accepted
    • assigned_to: Simon Sobisch
    • Group: GC 3.1 --> GC 3.x
     
  • Simon Sobisch

    Simon Sobisch - 2022-12-31

    Likely the same issue as [bugs:#740] (at least related) - the references are resolved at a bad time / from the wrong place.

     

    Related

    Bugs: #740

  • Simon Sobisch

    Simon Sobisch - 2026-06-29

    The other way around may also be true, see this test case:

           77 INT                      PIC S9(09)       COMP-5 IS TYPEDEF.
          *
           78 SHMHANDLE-UNSET          VALUE -2.
           01 Z-SHMHANDLE              USAGE INT   VALUE SHMHANDLE-UNSET.
              88 Z-SHMHANDLE-INVALID   VALUE -1, SHMHANDLE-UNSET.
    
     
  • Frank Swarbrick

    Frank Swarbrick - 2026-07-01

    I compiled the examples given with 3.3-dev.0 and received no compiler errors. I ran the result and received "GNU-TYPEDEF-level-88 >> ee:0004156 >> GNU:0000000000 >> passed".

     
  • Frank Swarbrick

    Frank Swarbrick - 2026-07-01

    I am surprised, though, that USAGE followed by a type name works. Type names are types, not usages. TYPE typename is correct, and also works.

     

Log in to post a comment.