new valarray warning

Benjamin Kosnik bkoz@redhat.com
Mon Mar 12 10:29:00 GMT 2001


...new warning I'm seeing today when compiling valarray-inst.cc:

/mnt/hd/ahimsa/bld-x86-gcc/gcc/g++ -B/mnt/hd/ahimsa/bld-x86-gcc/gcc/ -nostdinc++ -L/mnt/hd/ahimsa/bld-x86-gcc/i686-pc-linux-gnu/libstdc++-v3/src -L/mnt/hd/ahimsa/bld-x86-gcc/i686-pc-linux-gnu/libstdc++-v3/src/.libs -B/mnt/hd/bliss/H-x86-gcc/i686-pc-linux-gnu/bin/ -B/mnt/hd/bliss/H-x86-gcc/i686-pc-linux-gnu/lib/ -isystem /mnt/hd/bliss/H-x86-gcc/i686-pc-linux-gnu/include -nostdinc++ -I/mnt/hd/bliss/src.gcc/libstdc++-v3/include -I/mnt/hd/bliss/src.gcc/libstdc++-v3/include/std -I/mnt/hd/bliss/src.gcc/libstdc++-v3/include/c_std -I../include -I/mnt/hd/bliss/src.gcc/libstdc++-v3/libsupc++ -I../libio -I/mnt/hd/bliss/src.gcc/libstdc++-v3/libio -I/mnt/hd/bliss/src.gcc/libstdc++-v3/libmath -g -O2 -fvtable-thunks -D_GNU_SOURCE -fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -Winline -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -g -c /mnt/hd/bliss/src.gcc/libstdc++-v3/src/valarray-inst.cc  -fPIC -DPIC -o .libs/valarray-inst.o
/mnt/hd/bliss/src.gcc/libstdc++-v3/include/bits/std_valarray.h: In method `void    std::valarray<_Tp>::valarray() [with _Tp = size_t]':
/mnt/hd/bliss/src.gcc/libstdc++-v3/include/bits/std_valarray.h:325:   instantiated from `void std::valarray<_Tp>::valarray() [with _Tp = size_t]'
/mnt/hd/bliss/src.gcc/libstdc++-v3/include/bits/gslice.h:81:   instantiated from here
/mnt/hd/bliss/src.gcc/libstdc++-v3/include/bits/std_valarray.h:323: warning: function
   cannot be inline
/mnt/hd/bliss/src.gcc/libstdc++-v3/include/bits/std_valarray.h: In method 
   `std::valarray<_Tp>::valarray(const std::valarray<_Tp>&) [with _Tp = 
   size_t]':
/mnt/hd/bliss/src.gcc/libstdc++-v3/include/bits/std_valarray.h:280:   instantiated from `std::valarray<_Tp>::valarray(const std::valarray<_Tp>&) [with _Tp = size_t]'
/mnt/hd/bliss/src.gcc/libstdc++-v3/include/bits/gslice.h:81:   instantiated from here
/mnt/hd/bliss/src.gcc/libstdc++-v3/include/bits/std_valarray.h:279: warning: function
   cannot be inline
/mnt/hd/bliss/src.gcc/libstdc++-v3/include/bits/std_valarray.h: In method 
   `std::valarray<_Tp>::valarray(unsigned int) [with _Tp = size_t]':
/mnt/hd/bliss/src.gcc/libstdc++-v3/include/bits/std_valarray.h:265:   instantiated from `std::valarray<_Tp>::valarray(unsigned int) [with _Tp = size_t]'
/mnt/hd/bliss/src.gcc/libstdc++-v3/src/valarray-inst.cc:45:   instantiated from here
/mnt/hd/bliss/src.gcc/libstdc++-v3/include/bits/std_valarray.h:264: warning: function
   cannot be inline


Seems to be complaining aobut:

std_valarray:322
  template<typename _Tp>
  inline valarray<_Tp>::~valarray ()
  {
      __valarray_destroy_elements(_M_data, _M_data + _M_size);
      __valarray_release_memory(_M_data);
  }

std_valarry:263
  template<typename _Tp>
  inline valarray<_Tp>::valarray (size_t __n) 
      : _M_size(__n), _M_data(__valarray_get_storage<_Tp>(__n))
  { __valarray_default_construct(_M_data, _M_data + __n); }


Any ideas?

-benjamin



More information about the Libstdc++ mailing list