This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13592] New: C++ parser regression
- From: "rwgk at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Jan 2004 23:33:12 -0000
- Subject: [Bug c++/13592] New: C++ parser regression
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gcc snapshot from 2003/12/30, ca. 7:40am PST
Configured with: ../gcc/configure --prefix=/usr/local_cci/gcc_cvs_2003_12_30 --
enable-languages=c,c++
Redhat Linux 8.0
gcc 3.4.0 fails to compile this piece of code:
result[ir] = boost::lcm(
result[ir], norm_denominator(r_(ir, ic), grid[ic]));
However, it works with this trivial modification:
result[ir] = boost::lcm(
result[ir], norm_denominator(this->r_(ir, ic), grid[ic]));
The original code works with many other compilers incl. earlier gcc's. Note
that r_ is a member of the rt_mx class and *not* inherited. I will attach a
preprocessed file that can be used to reproduce the problem and the workaround:
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/adptbx/boost_python/adptbx_ext.cpp >
adptbx_ext_pp.cpp
g++ -fPIC -ftemplate-depth-120 -w -O3 -c adptbx_ext_pp.cpp
In file included
from /net/worm/scratch1/rwgk/rc1310/cctbx/include/cctbx/sgtbx/change_of_basis_op
.h:16,
from /net/worm/scratch1/rwgk/rc1310/cctbx/include/cctbx/sgtbx/tr_group.h:17,
from /net/worm/scratch1/rwgk/rc1310/cctbx/include/cctbx/sgtbx/space_group.h:17,
from /net/worm/scratch1/rwgk/rc1310/cctbx/include/cctbx/sgtbx/site_symmetry.h:14
,
from /net/worm/scratch1/rwgk/rc1310/cctbx/include/cctbx/xray/scatterer.h:4,
from /net/worm/scratch1/rwgk/rc1310/cctbx/include/cctbx/boost_python/flex_fwd.h:
10,
from /net/worm/scratch1/rwgk/rc1310/cctbx/adptbx/boost_python/adptbx_ext.cpp:1:
/net/worm/scratch1/rwgk/rc1310/cctbx/include/cctbx/sgtbx/rt_mx.h: In member
function `GridTupleType cctbx::sgtbx::rt_mx::refine_gridding(const
GridTupleType&) const':
/net/worm/scratch1/rwgk/rc1310/cctbx/include/cctbx/sgtbx/rt_mx.h:414: error:
call to non-function `cctbx::sgtbx::rt_mx::r_'
diff adptbx_ext_pp.cpp adptbx_ext_pp_patched.cpp
47390c47390
< result[ir], norm_denominator(r_(ir, ic), grid[ic]));
---
> result[ir], norm_denominator(this->r_(ir, ic), grid[ic]));
g++ -fPIC -ftemplate-depth-120 -w -O3 -c adptbx_ext_pp_patched.cpp
Succeeds.
--
Summary: C++ parser regression
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 build triplet: g++ (GCC) 3.4.0 20031230 (experimental)
GCC host triplet: i686-gnu-linux
GCC target triplet: i686-gnu-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13592