[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45753] warning("error") breaks many things
From: |
Lachlan Andrew |
Subject: |
[Octave-bug-tracker] [bug #45753] warning("error") breaks many things |
Date: |
Fri, 14 Aug 2015 03:13:00 +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/?45753>
Summary: warning("error") breaks many things
Project: GNU Octave
Submitted by: lachlan
Submitted on: Fri 14 Aug 2015 03:12:59 AM GMT
Category: Octave Function
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:
The code
warning("error")
help warning
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.)
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45753>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #45753] warning("error") breaks many things,
Lachlan Andrew <=