octave-maintainers
[Top][All Lists]
Advanced

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

Obsolete warning IDs


From: John W. Eaton
Subject: Obsolete warning IDs
Date: Sat, 5 Nov 2011 16:07:31 -0400

On  5-Nov-2011, Rik wrote:

| While working on the documentation for warning_ids() I came across several
| warnings which *appear* to no longer be implemented.  If this was a
| conscious choice I can now remove them from the documentation.  If it is an
| accident then we can look at re-instating them.
| 
| For example, The documentation of 'empty-list-elements' is
| 
| "If the Octave:empty-list-elements warning is enabled, a warning is issued
| when an empty matrix is found in a matrix list. For example:
| a = [1, [], 3, [], 5]
| By default, the Octave:empty-list-elements warning is enabled."
| 
| Trying this out,
| 
| --- CODE ---
| warning ("query", "Octave:empty-list-elements")
| ans =
| 
|   scalar structure containing the fields:
| 
|     identifier = Octave:empty-list-elements
|     state = off
| --- END CODE ---
| 
| So the documentation is wrong and the warning is not enabled by default.
| 
| --- CODE ---
| warning ("on", "Octave:empty-list-elements")
| a = [1, [], 3, [], 5]
| a =
| 
|    1   3   5
| --- END CODE ---
| 
| There is no warning printed even when the warning is explicitly turned on.
| 
| The complete list of warning IDs which fail to produce a warning is:
| empty-list-elements
| fortran-indexing
| future-time-stamp
| imag-to-real
| num-to-str
| reload-forces-clear
| 
| Please write if you know that one of these warnings is supposed to work. 
| Otherwise, I will assume they just holdovers from previous versions and can
| be removed from the documentation.

I see empty-list-elements still used in pt-mat.cc, but only in 
tm_row_const::tm_row_const_rep::eval_warning, and that function
doesn't seem to be called.  So maybe it is time to remove it.

fortran-indexing can probably go away now.  I don't see it used
anywhere except in some test files.

future-time-stamp is used in oct-parse.yy and oct-shlib.cc, so it
should probably not be removed.

imag-to-real and num-to-str are used in various matrix functions, so
they should probably not be removed.  But if they are used
inconsistently, then maybe we should decide whether to try to be
consistent or just remove the warnings.  I guess it depends on whether
the inconsistent warnings are helpful.

reload-forces-clear is used in dynamic-ld.cc, so it should probably
not be removed.

jwe


reply via email to

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