bugGNU Octave - Bugs: bug #45753, warning("error") breaks...

 
 

bug #45753: warning("error") breaks many things

Submitted by:  Lachlan Andrew <lachlan>
Submitted on:  Fri 14 Aug 2015 03:12:59 AM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Feature Request
Status: FixedAssigned to: Kai Torben Ohlhus <siko1056>
Originator Name: LachlanOpen/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 22 Dec 2015 11:33:13 PM UTC, comment #4:

Alright, thank you very much for your patch. It works for me and no errors occur. I translated your patch to stable adding a test case, thus it gets merged to default very soon. This misbehavior is also present in stable and can be avoided there already in the next upcoming release. See

http://hg.savannah.gnu.org/hgweb/octave/rev/6ed7bae8017b

Kai Torben Ohlhus <siko1056>
Project MemberIn charge of this item.
Tue 22 Dec 2015 10:12:00 PM UTC, comment #3:

Kai, it is relative to default. Sorry for not stating that.

Lachlan Andrew <lachlan>
Project Member
Mon 21 Dec 2015 01:05:41 PM UTC, comment #2:

Is your patch for the default or stable branch? Applying it to stable results in an error.

Kai Torben Ohlhus <siko1056>
Project MemberIn charge of this item.
Sat 19 Dec 2015 10:45:28 AM UTC, comment #1:

The attached patch fixes this by making warning("error"/"on"/"off") only apply to the default behaviour.

Specifying "all" explicitly [warning("error", "all")] still explicitly removes explicit settings.

(file #35798)

Lachlan Andrew <lachlan>
Project Member
Fri 14 Aug 2015 03:12:59 AM UTC, original submission:

The code
causes the error message

error: concatenation of different character string types may have unintended consequences

That means that once warning("error") is turned on, it is impossible to see if it is possible to return warnings to their default settings. Other functions are affected too (I found it first in strread).

I'd like to fix this by making warning("error") only convert enabled warnings to errors, rather than all warnings. (That obeys the principle of least surprise.) This could either be those warnings enabled when the command is issued (easiest and most efficient), or those warnings enabled when the warning is triggered (probably the best, especially for user-defined warnings).

An alternative is to go through all the libraries and eliminate all code that can produce spurious warnings. The extra checking etc may slow execution down, and would add to code bloat.

(Apologies if this is a duplicate of something I just wrote; I tried to report the bug, but the bug report didn't appear.)

Lachlan Andrew <lachlan>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #35798:  bug_45753.cset added by lachlan (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by siko1056 (Updated the item)
  • -unavailable- added by lachlan (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 22 Dec 2015 11:33:13 PM UTCsiko1056StatusPatch Submitted=>Fixed
      Assigned toNone=>siko1056
      Open/ClosedOpen=>Closed
      Release4.0.0=>dev
      Operating SystemGNU/Linux=>Any
    Sun 20 Dec 2015 08:01:34 PM UTCsiko1056StatusConfirmed=>Patch Submitted
    Sat 19 Dec 2015 10:45:27 AM UTClachlanAttached File-=>Added bug_45753.cset, #35798
    Mon 28 Sep 2015 03:15:15 PM UTCsiko1056StatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1