[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GCC_ATTR_DEPRECATED ?
From: |
Ben Abbott |
Subject: |
Re: GCC_ATTR_DEPRECATED ? |
Date: |
Fri, 21 Sep 2012 18:45:00 -0400 |
On Sep 21, 2012, at 6:27 PM, Ben Abbott wrote:
> I've just pull and attempted a build which resulted in the error below.
>
> libtool: compile: /opt/local/bin/g++-mp-4.5 -DHAVE_CONFIG_H -I. -I..
> -I./array -I./cruft/misc -Inumeric -I./numeric -Ioperators -I./operators
> -I./system -I./util -I../libgnu -I../libgnu -D_THREAD_SAFE
> -I/opt/local/include -I/opt/local/include -I/opt/local/include/freetype2
> -I/opt/local/include -I/opt/local/include -Wall -W -Wshadow -Wold-style-cast
> -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -pipe -O0
> -g -m64 -ggdb3 -gstabs -D_THREAD_SAFE -D_THREAD_SAFE -pthread -MT
> array/array_libarray_la-Array-d.lo -MD -MP -MF
> array/.deps/array_libarray_la-Array-d.Tpo -c array/Array-d.cc -fno-common
> -DPIC -o array/.libs/array_libarray_la-Array-d.o
> libtool: compile: /opt/local/bin/g++-mp-4.5 -DHAVE_CONFIG_H -I. -I..
> -I./array -I./cruft/misc -Inumeric -I./numeric -Ioperators -I./operators
> -I./system -I./util -I../libgnu -I../libgnu -D_THREAD_SAFE
> -I/opt/local/include -I/opt/local/include -I/opt/local/include/freetype2
> -I/opt/local/include -I/opt/local/include -Wall -W -Wshadow -Wold-style-cast
> -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -pipe -O0
> -g -m64 -ggdb3 -gstabs -D_THREAD_SAFE -D_THREAD_SAFE -pthread -MT
> array/array_libarray_la-Array-ch.lo -MD -MP -MF
> array/.deps/array_libarray_la-Array-ch.Tpo -c array/Array-ch.cc -fno-common
> -DPIC -o array/.libs/array_libarray_la-Array-ch.o
> In file included from array/Array-b.cc:112:0:
> array/DiagArray2.h:100:61: error: expected ';' before 'const'
> In file included from array/Array-b.cc:113:0:
> array/DiagArray2.cc:51:41: error: no 'Array<T>
> DiagArray2<T>::diag(octave_idx_type) const' member function declared in class
> 'DiagArray2<T>'
> In file included from array/Array-ch.cc:41:0:
> array/DiagArray2.h:100:61: error: expected ';' before 'const'
> In file included from array/Array-ch.cc:42:0:
> array/DiagArray2.cc:51:41: error: no 'Array<T>
> DiagArray2<T>::diag(octave_idx_type) const' member function declared in class
> 'DiagArray2<T>'
> In file included from array/Array-d.cc:164:0:
> array/DiagArray2.h:100:61: error: expected ';' before 'const'
> In file included from array/Array-d.cc:165:0:
> array/DiagArray2.cc:51:41: error: no 'Array<T>
> DiagArray2<T>::diag(octave_idx_type) const' member function declared in class
> 'DiagArray2<T>'
> In file included from array/Array-C.cc:97:0:
> array/DiagArray2.h:100:61: error: expected ';' before 'const'
> In file included from array/Array-C.cc:98:0:
> array/DiagArray2.cc:51:41: error: no 'Array<T>
> DiagArray2<T>::diag(octave_idx_type) const' member function declared in class
> 'DiagArray2<T>'
>
> I noticed the recent change to DiagArray2.h. Looking at the changeset I
> noticed my sources do not reflect what I see on-line. My DiagArray2.h
> includes the snippet below.
>
> 99
> 100 Array<T> diag (octave_idx_type k = 0) GCC_ATTR_DEPRECATED const;
> 101 Array<T> extract_diag (octave_idx_type k = 0) const;
> 102 DiagArray2<T> build_diag_matrix () const
> 103 {
> 104 return DiagArray2<T> (array_value ());
> 105 }
> 106
>
> While the on-line version has
>
> 99
> 100 Array<T> diag (octave_idx_type k = 0) const;
> 101 Array<T> extract_diag (octave_idx_type k = 0) const;
> 102 DiagArray2<T> build_diag_matrix () const
> 103 {
> 104 return DiagArray2<T> (array_value ());
> 105 }
> 106
>
> Any idea where the "GCC_ATTR_DEPRECATED" is coming from?
>
> Ben
I deleted the "GCC_ATTR_DEPRECATED"
$ hg diff
diff --git a/liboctave/array/DiagArray2.h b/liboctave/array/DiagArray2.h
--- a/liboctave/array/DiagArray2.h
+++ b/liboctave/array/DiagArray2.h
@@ -97,7 +97,7 @@
dim_vector dims (void) const { return dim_vector (d1, d2); }
- Array<T> diag (octave_idx_type k = 0) GCC_ATTR_DEPRECATED const;
+ 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
{
... and my build is now able to continue.
Ben