Mercurial > octave
changeset 21012:91a45293b618
maint: Move GCC_ATTR_DEPRECATED to beginning of function declaration.
* error.h, symtab.h, variables.h, ov.h, DiagArray2.h, PermMatrix.h,
dSparse.h, unwind-prot.h:
Move GCC_ATTR_DEPRECATED to beginning of function declaration.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 29 Dec 2015 11:02:26 -0800 |
parents | d9f4e4961e09 |
children | 7f4c6d594e3d |
files | libinterp/corefcn/error.h libinterp/corefcn/symtab.h libinterp/corefcn/variables.h libinterp/octave-value/ov.h liboctave/array/DiagArray2.h liboctave/array/PermMatrix.h liboctave/array/dSparse.h liboctave/util/unwind-prot.h |
diffstat | 8 files changed, 38 insertions(+), 37 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/error.h Wed Dec 30 09:46:05 2015 +0100 +++ b/libinterp/corefcn/error.h Tue Dec 29 11:02:26 2015 -0800 @@ -43,8 +43,8 @@ extern OCTINTERP_API void message (const char *name, const char *fmt, ...); -extern OCTINTERP_API void vusage (const char *fmt, va_list args) GCC_ATTR_NORETURN GCC_ATTR_DEPRECATED; -extern OCTINTERP_API void usage (const char *fmt, ...) GCC_ATTR_NORETURN GCC_ATTR_DEPRECATED; +GCC_ATTR_DEPRECATED extern OCTINTERP_API void vusage (const char *fmt, va_list args) GCC_ATTR_NORETURN; +GCC_ATTR_DEPRECATED extern OCTINTERP_API void usage (const char *fmt, ...) GCC_ATTR_NORETURN; extern OCTINTERP_API void vwarning (const char *fmt, va_list args); extern OCTINTERP_API void warning (const char *fmt, ...);
--- a/libinterp/corefcn/symtab.h Wed Dec 30 09:46:05 2015 +0100 +++ b/libinterp/corefcn/symtab.h Tue Dec 29 11:02:26 2015 -0800 @@ -1340,10 +1340,10 @@ } // Use assign (name, value, scope, context, force_add) instead. - static octave_value& + GCC_ATTR_DEPRECATED static octave_value& varref (const std::string& name, scope_id scope = xcurrent_scope, context_id context = xdefault_context, bool force_add = false) - GCC_ATTR_DEPRECATED + { static octave_value foobar; @@ -1364,9 +1364,9 @@ } // Use force_assign (name, value, scope, context) instead. - static octave_value& + GCC_ATTR_DEPRECATED static octave_value& force_varref (const std::string& name, scope_id scope = xcurrent_scope, - context_id context = xdefault_context) GCC_ATTR_DEPRECATED + context_id context = xdefault_context) { static octave_value foobar; @@ -1398,8 +1398,8 @@ } // Use global_assign (name, value) instead. - static octave_value& - global_varref (const std::string& name) GCC_ATTR_DEPRECATED + GCC_ATTR_DEPRECATED static octave_value& + global_varref (const std::string& name) { global_table_iterator p = global_table.find (name); @@ -1423,8 +1423,8 @@ } // Use top_level_assign (name, value) instead. - static octave_value& - top_level_varref (const std::string& name) GCC_ATTR_DEPRECATED + GCC_ATTR_DEPRECATED static octave_value& + top_level_varref (const std::string& name) { static octave_value foobar; @@ -1450,8 +1450,8 @@ } // Use persistent_assign (name, value) instead. - static octave_value& persistent_varref (const std::string& name) - GCC_ATTR_DEPRECATED + GCC_ATTR_DEPRECATED static octave_value& + persistent_varref (const std::string& name) { static octave_value foobar;
--- a/libinterp/corefcn/variables.h Wed Dec 30 09:46:05 2015 +0100 +++ b/libinterp/corefcn/variables.h Tue Dec 29 11:02:26 2015 -0800 @@ -137,9 +137,9 @@ extern OCTINTERP_API void bind_ans (const octave_value& val, bool print); -extern OCTINTERP_API void +GCC_ATTR_DEPRECATED extern OCTINTERP_API void bind_internal_variable (const std::string& fname, - const octave_value& val) GCC_ATTR_DEPRECATED; + const octave_value& val); extern OCTINTERP_API void mlock (void); extern OCTINTERP_API void munlock (const std::string&);
--- a/libinterp/octave-value/ov.h Wed Dec 30 09:46:05 2015 +0100 +++ b/libinterp/octave-value/ov.h Tue Dec 29 11:02:26 2015 -0800 @@ -243,12 +243,12 @@ octave_value (const charMatrix& chm, char type = '\''); octave_value (const charNDArray& chnda, char type = '\''); octave_value (const Array<char>& chnda, char type = '\''); - octave_value (const charMatrix& chm, bool is_string, - char type = '\'') GCC_ATTR_DEPRECATED; - octave_value (const charNDArray& chnda, bool is_string, - char type = '\'') GCC_ATTR_DEPRECATED; - octave_value (const Array<char>& chnda, bool is_string, - char type = '\'') GCC_ATTR_DEPRECATED; + GCC_ATTR_DEPRECATED octave_value (const charMatrix& chm, bool is_string, + char type = '\''); + GCC_ATTR_DEPRECATED octave_value (const charNDArray& chnda, bool is_string, + char type = '\''); + GCC_ATTR_DEPRECATED octave_value (const Array<char>& chnda, bool is_string, + char type = '\''); octave_value (const SparseMatrix& m, const MatrixType& t = MatrixType ()); octave_value (const Sparse<double>& m, const MatrixType& t = MatrixType ()); octave_value (const SparseComplexMatrix& m, @@ -297,7 +297,7 @@ octave_value (octave_value::magic_colon); octave_value (octave_base_value *new_rep, bool borrow = false); - octave_value (octave_base_value *new_rep, int xcount) GCC_ATTR_DEPRECATED; + GCC_ATTR_DEPRECATED octave_value (octave_base_value *new_rep, int xcount); // Copy constructor. @@ -895,7 +895,7 @@ string_vector string_vector_value (bool pad = false) const { return rep->string_vector_value (pad); } - string_vector all_strings (bool pad = false) const GCC_ATTR_DEPRECATED + GCC_ATTR_DEPRECATED string_vector all_strings (bool pad = false) const { return string_vector_value (pad); } Cell cell_value (void) const;
--- a/liboctave/array/DiagArray2.h Wed Dec 30 09:46:05 2015 +0100 +++ b/liboctave/array/DiagArray2.h Tue Dec 29 11:02:26 2015 -0800 @@ -97,7 +97,7 @@ dim_vector dims (void) const { return dim_vector (d1, d2); } - Array<T> diag (octave_idx_type k = 0) const GCC_ATTR_DEPRECATED; + GCC_ATTR_DEPRECATED Array<T> diag (octave_idx_type k = 0) const; Array<T> extract_diag (octave_idx_type k = 0) const; DiagArray2<T> build_diag_matrix () const {
--- a/liboctave/array/PermMatrix.h Wed Dec 30 09:46:05 2015 +0100 +++ b/liboctave/array/PermMatrix.h Tue Dec 29 11:02:26 2015 -0800 @@ -37,13 +37,13 @@ PermMatrix (octave_idx_type n); - PermMatrix (const Array<octave_idx_type>& p) GCC_ATTR_DEPRECATED; + GCC_ATTR_DEPRECATED PermMatrix (const Array<octave_idx_type>& p); PermMatrix (const Array<octave_idx_type>& p, bool colp, bool check = true); PermMatrix (const PermMatrix& m) : Array<octave_idx_type> (m) { } - PermMatrix (const idx_vector& idx) GCC_ATTR_DEPRECATED; + GCC_ATTR_DEPRECATED PermMatrix (const idx_vector& idx); PermMatrix (const idx_vector& idx, bool colp, octave_idx_type n = 0);
--- a/liboctave/array/dSparse.h Wed Dec 30 09:46:05 2015 +0100 +++ b/liboctave/array/dSparse.h Tue Dec 29 11:02:26 2015 -0800 @@ -121,13 +121,14 @@ friend OCTAVE_API SparseMatrix real (const SparseComplexMatrix& a); friend OCTAVE_API SparseMatrix imag (const SparseComplexMatrix& a); - friend OCTAVE_API SparseMatrix atan2 (const double& x, const SparseMatrix& y) - GCC_ATTR_DEPRECATED ; - friend OCTAVE_API SparseMatrix atan2 (const SparseMatrix& x, const double& y) - GCC_ATTR_DEPRECATED ; - friend OCTAVE_API SparseMatrix atan2 (const SparseMatrix& x, - const SparseMatrix& y) - GCC_ATTR_DEPRECATED ; + friend GCC_ATTR_DEPRECATED OCTAVE_API + SparseMatrix atan2 (const double& x, const SparseMatrix& y); + + friend GCC_ATTR_DEPRECATED OCTAVE_API + SparseMatrix atan2 (const SparseMatrix& x, const double& y); + + friend GCC_ATTR_DEPRECATED OCTAVE_API + SparseMatrix atan2 (const SparseMatrix& x, const SparseMatrix& y); SparseMatrix transpose (void) const {
--- a/liboctave/util/unwind-prot.h Wed Dec 30 09:46:05 2015 +0100 +++ b/liboctave/util/unwind-prot.h Tue Dec 29 11:02:26 2015 -0800 @@ -50,14 +50,14 @@ lifo.push (new_elem); } - void add (void (*fcn) (void *), void *ptr = 0) GCC_ATTR_DEPRECATED + GCC_ATTR_DEPRECATED void add (void (*fcn) (void *), void *ptr = 0) { add (new fcn_arg_elem<void *> (fcn, ptr)); } operator bool (void) const { return ! empty (); } - void run_top (void) GCC_ATTR_DEPRECATED { run_first (); } + GCC_ATTR_DEPRECATED void run_top (void) { run_first (); } void run_first (void) { @@ -70,9 +70,9 @@ } } - void run_top (int num) GCC_ATTR_DEPRECATED { run (num); } + GCC_ATTR_DEPRECATED void run_top (int num) { run (num); } - void discard_top (void) GCC_ATTR_DEPRECATED { discard_first (); } + GCC_ATTR_DEPRECATED void discard_top (void) { discard_first (); } void discard_first (void) { @@ -84,7 +84,7 @@ } } - void discard_top (int num) GCC_ATTR_DEPRECATED { discard (num); } + GCC_ATTR_DEPRECATED void discard_top (int num) { discard (num); } size_t size (void) const { return lifo.size (); }