Menu

strange Compilation Error message

2024-02-17
2024-02-17
  • Eugenio Di Lorenzo

    I get this strange error message from the compiler.
    See attached screeshot.
    Da
    How can I understand what it is ?

     
    • Simon Sobisch

      Simon Sobisch - 2024-02-17

      The screenshot means that this isn't easily seen, and not possible to search... Please copy+paste messages as text.

      The message contained says that there's an error in there codegen (or the parser). Please provide a minimal example for this.

       
      • Eugenio Di Lorenzo

        You can find the complete source code at:
        https://github.com/acejacek/Cobol/blob/master/sudoku.cbl
        her eis text error message:

        C:\OpenCobolIDE\GC20base2\bin\cobc.exe -x -o bin\SUDOKU.exe -std=default -debug -fdebugging-line -ftrace -free -luser32 -lpdcurses SUDOKU.COB
        C:\Users\DILO\AppData\Local\Temp\cob4304_0.c: In function 'TABLE__ANALYSIS_':
        C:\Users\DILO\AppData\Local\Temp\cob4304_0.c:1985:3: error: 'b_201' undeclared (first use in this function); did you mean 'b_205'?
         1985 |   b_201 = 1;
              |   ^~~~~
              |   b_205
        C:\Users\DILO\AppData\Local\Temp\cob4304_0.c:1985:3: note: each undeclared identifier is reported only once for each function it appears in
        C:\Users\DILO\AppData\Local\Temp\cob4304_0.c:1988:3: error: 'b_203' undeclared (first use in this function); did you mean 'b_205'?
         1988 |   b_203 = 1;
              |   ^~~~~
              |   b_205
        
         
    • Vincent (Bryan) Coen

      On 17/02/2024 18:07, Eugenio Di Lorenzo wrote:

      I get this strange error message from the compiler.
      See attached screeshot.
      Da
      How can I understand what it is ?

      If you remove the "VALUE ZERO from the table and do a "move zeros to
      sudoku-Table" at beginning of proc div does it fix it ?

      I am assuming here you are using v3.2 of GC, yes ?

      vince

       
      • Eugenio Di Lorenzo

        Yes

         
    • Vincent (Bryan) Coen

      On 17/02/2024 18:07, Eugenio Di Lorenzo wrote:

      I get this strange error message from the compiler.
      See attached screeshot.
      Da
      How can I understand what it is ?

      Ignore my previous response,

      I just tried it on my copy and produces same fault using initialise
      SUDOKU-TABLE.

      This does assume that the fault lies with the table but the error
      message could be any thing.

      I have been getting some strange error messages using v3.2 and v3.3 that
      did not occur with any earlier version.

      Code complained about is in sudoku.c lines as reported and shows as :

      / initialize field IDX /
        b_201 = 1;

      / initialize field IDY /
        b_203 = 1;

      These are not used any where else nor in the other generated sudoku.c or
      .h files that I could find.

       

Anonymous
Anonymous

Add attachments
Cancel