[Top][All Lists]

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


From: Rik
Subject: Should OCTAVE_DEPRECATED macro also apply OCTAVE_UNUSED?
Date: Fri, 2 Nov 2018 11:10:27 -0700


I checked in a changeset to deprecate the C++ function is_hghandle in favor
of ishghandle (https://hg.savannah.gnu.org/hgweb/octave/rev/fbc23950b00a). 
Where possible, it is better to have the C++ function names match the
Octave language functions so that programmers who are unfamiliar with the
core C++ code can, nevertheless, follow what the code is doing.

However, I'm now getting compilation messages that deprecated functions are
unused.  This hasn't been a problem before because the use of the
OCTAVE_DEPRECATED macro has been in .h header files, but the most recent
change takes place in a .cc file.

One possible solution is to have the OCTAVE_DEPRECATED macro also set the
attribute for unused.  Or, programmers could specifically add the
OCTAVE_UNUSED decoration to the function as well.  This works, but to my
eye seems long and klunky.  But, we also shouldn't care too much since this
code will be deleted within two versions of Octave.

OCTAVE_UNUSED OCTAVE_DEPRECATED (5.0, "use 'ishghandle' instead")

Does anyone else have an opinion on which path to take?


reply via email to

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