bugGNU Octave - Bugs: bug #57159, warning missing-semicolon reports...

 
 

bug #57159: warning missing-semicolon reports line -1 and column -1 for an array

Submitted by:  None
Submitted on:  Sun 03 Nov 2019 03:33:27 PM UTC  
 
Category:  Interpreter Severity:  1 - Wish
Priority:  3 - Low Item Group:  Inaccurate Result
Status:  Confirmed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  dev
Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 03 Nov 2019 04:12:47 PM UTC, comment #1: 

Confirmed.  I have uploaded a new example file "f2.m" which I used to reproduce the result.  The contents of f2.m are

function f1()
[a]
endfunction

Running the code with the latest development branch shows

run-octave -f -q
octave:1> warning ("on", "Octave:missing-semicolon");
octave:2> f2
warning: missing semicolon near line -1, column -1 in file '/home/rik/wip/Projects_Mine/octave-dev/f2.m'
warning: function name 'f1' does not agree with function filename '/home/rik/wip/Projects_Mine/octave-dev/f2.m'
error: 'a' undefined near line 2, column 2
error: called from
    f2

So some reporting, such as 'a' undefined', correctly identifies the line number, while the missing semicolon warning does not.

(file #47789)

Rik <rik5>
Project Administrator
Sun 03 Nov 2019 03:33:27 PM UTC, original submission:  

user@m $ cat /file
function f1()
[a]
endfunction

octave:1> warning("on", "Octave:missing-semicolon");
octave:2> run("/file");
warning: missing semicolon near line -1, column -1 in file '/file'

If [a] is replaced with a, the reported line and column are 2 and 1 respectively.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #47789:  f2.m added by rik5 (30B - text/x-matlab)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-11-03 rik5 Attached File- => Added f2.m, #47789
        Severity3 - Normal => 1 - Wish
        Priority5 - Normal => 3 - Low
        Item GroupFeature Request => Inaccurate Result
        StatusNone => Confirmed
        Release5.1.0 => dev

    Back to the top


    Powered by Savane 3.5