This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/13969] New: static const value rejected as template parameter


gcc-3_4-branch from 2004/02/01, ca. 12:00pm PST
Configured with: ../gcc-3_4-branch/configure --prefix=/usr/local_cci/gcc-3_4-
branch_2004_02_01_1211 --enable-languages=c,c++
Redhat Linux 8.0

% g++ -fPIC -ftemplate-depth-120 -w -DNDEBUG -O3 -DBOOST_PYTHON_MAX_BASES=2 -
Iinclude -I/net/worm/scratch1/rwgk/rc1310/include -
I/net/worm/scratch1/rwgk/rc1310/cctbx/include -
I/net/worm/scratch1/rwgk/rc1310/scitbx/include -
I/net/worm/scratch1/rwgk/rc1310/boost -I/usr/include/python2.2 -
E /net/worm/scratch1/rwgk/rc1310/cctbx/xray/boost_python/fast_gradients.cpp > 
fast_gradients_pp.cpp

% g++ -fPIC -ftemplate-depth-120 -w -DNDEBUG -O3 -c fast_gradients_pp.cpp |& 
head
In file included 
from /net/worm/scratch1/rwgk/rc1310/cctbx/include/cctbx/xray/fast_gradients.h:4,
                 
from /net/worm/scratch1/rwgk/rc1310/cctbx/xray/boost_python/fast_gradients.cpp:3
:
/net/worm/scratch1/rwgk/rc1310/cctbx/include/cctbx/xray/sampling_base.h:361: 
error: non-constant 
`cctbx::xray::detail::gaussian_fourier_transformed<FloatType>::max_n_rho_real_te
rms' cannot be used as template argument
/net/worm/scratch1/rwgk/rc1310/cctbx/include/cctbx/xray/sampling_base.h:361: 
error: ISO C++ forbids declaration of `as_real_' with no type
/net/worm/scratch1/rwgk/rc1310/cctbx/include/cctbx/xray/sampling_base.h:362: 
error: non-constant 
`cctbx::xray::detail::gaussian_fourier_transformed<FloatType>::max_n_rho_real_te
rms' cannot be used as template argument
/net/worm/scratch1/rwgk/rc1310/cctbx/include/cctbx/xray/sampling_base.h:362: 
error: ISO C++ forbids declaration of `bs_real_' with no type
/net/worm/scratch1/rwgk/rc1310/cctbx/include/cctbx/xray/sampling_base.h:364: 
error: non-constant 
`cctbx::xray::detail::gaussian_fourier_transformed<FloatType>::max_n_rho_real_te
rms' cannot be used as template argument
/net/worm/scratch1/rwgk/rc1310/cctbx/include/cctbx/xray/sampling_base.h:364: 
error: ISO C++ forbids declaration of `aniso_bs_real_' with no type
/net/worm/scratch1/rwgk/rc1310/cctbx/include/cctbx/xray/sampling_base.h: In 
constructor 
`cctbx::xray::detail::gaussian_fourier_transformed<FloatType>::gaussian_fourier_
transformed(cctbx::xray::detail::exponent_table<FloatType>&, const 
cctbx::eltbx::xray_scattering::gaussian&, const FloatType&, const FloatType&, 
const FloatType&, const FloatType&, const FloatType&)':
/net/worm/scratch1/rwgk/rc1310/cctbx/include/cctbx/xray/sampling_base.h:247: 
error: invalid types `int[size_t]' for array subscript

The same code compiles with many other compilers incl. earlier versions of gcc. 
It also compiled with gcc-3.4.0 from 2004/01/12.

I will attach the preprocessed source code. The same file is also available 
here:

http://cci.lbl.gov/~rwgk/bugs/gcc340/fast_gradients_pp.cpp.gz

-- 
           Summary: static const value rejected as template parameter
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rwgk at yahoo dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux
GCC target triplet: i686-pc-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13969


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]