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

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

[Octave-bug-tracker] [bug #58296] Weird warning behaviour - regression b


From: Tasos Papastylianou
Subject: [Octave-bug-tracker] [bug #58296] Weird warning behaviour - regression bug?
Date: Sun, 3 May 2020 08:23:29 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0

URL:
  <https://savannah.gnu.org/bugs/?58296>

                 Summary: Weird warning behaviour - regression bug?
                 Project: GNU Octave
            Submitted by: tpapastylianou
            Submitted on: Sun 03 May 2020 12:23:27 PM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Regression
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: 5.2.0
         Discussion Lock: Any
        Operating System: GNU/Linux

    _______________________________________________________

Details:

The warning function behaves oddly.

Consider the following cases:

Case 1: Querying a non-existent warning reports it as being 'on'.


octave:1&gt; warning( 'query', 'BohemianRhapsody:this-is-the-real-life' )
ans =
  scalar structure containing the fields:
    identifier = BohemianRhapsody:this-is-the-real-life
    state = on


Case 2: Explicitly turning 'on' 'all' warnings breaks warning function.


octave:1&gt; warning query all
ans =
  1x14 struct array containing the fields:
    identifier
    state

octave:2&gt; warning on all
octave:3&gt; warning query all
ans =
  scalar structure containing the fields:
    identifier = all
    state = on


Case 3: Warnings regarding shadowing:


octave:1&gt; warning query Octave:shadowed-function
ans =
  scalar structure containing the fields:
    identifier = Octave:shadowed-function
    state = on

octave:2&gt; clear = 5
clear =  5


Case 4: Octave only reports the first 14 warnings explicitly. Furthermore, it
says all are enabled, but then reports off.


octave:1&gt; warning
By default, warnings are enabled.

    off  Octave:array-as-logical
    off  Octave:array-to-scalar
    off  Octave:array-to-vector
    off  Octave:imag-to-real
    off  Octave:language-extension
    off  Octave:missing-semicolon
    off  Octave:neg-dim-as-zero
    off  Octave:resize-on-range-error
    off  Octave:separator-insert
    off  Octave:single-quote-string
    off  Octave:str-to-num
    off  Octave:mixed-string-concat
    off  Octave:variable-switch-label



What's going on?
Is this a regression bug?

PS. As an aside, the use of the keyword 'all' in the context of 'warning' is
not properly documented in its helpstring / syntax description.




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58296>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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