octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #45878] warning "Octave:language-extension" sh


From: Lachlan Andrew
Subject: [Octave-bug-tracker] [bug #45878] warning "Octave:language-extension" should only warn in user code
Date: Sat, 05 Sep 2015 10:14:41 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36

URL:
  <http://savannah.gnu.org/bugs/?45878>

                 Summary: warning "Octave:language-extension" should only warn
in user code
                 Project: GNU Octave
            Submitted by: lachlan
            Submitted on: Sat 05 Sep 2015 10:14:40 AM GMT
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Feature Request
                  Status: None
             Assigned to: None
         Originator Name: Lachlan
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.0.0
        Operating System: GNU/Linux

    _______________________________________________________

Details:

What is the purpose of warning "Octave:language-extension"?
I am trying to write code compatible with Matlab, and though that turning this
warning on would warn me when I use something not compatible with Matlab.

Instead, when I turn this warning on, it fills the screen with warnings about
Octave's libraries using language extensions, but fails to tell me, for
example, when I use  endif  instead of  end.


To make this warning useful, I propose that we:
1. Have a new mode for warnings.  As well as "off", "on" and "error", there
could be "user", which turns the warning on in user code but off in library
code.  There could also be "user-error" to raise errors if the condition
occurs in user code.  I assume that fcn.is_user_code ()  can be used to test
this.
2. Overhaul the places Octave:language-extension is raised, so that it
reliably raises errors for code that is syntactically incompatible with
Matlab.
3. Add a new warning for code syntactically compatible with Matlab, but which
would cause run-time errors.

Any suggestions?




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45878>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]