c++/10224: [3.4 regression] Problem with integral constants (+ICE)
bangerth@ticam.utexas.edu
bangerth@ticam.utexas.edu
Wed Mar 26 17:25:00 GMT 2003
>Number: 10224
>Category: c++
>Synopsis: [3.4 regression] Problem with integral constants (+ICE)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Mar 26 16:56:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Wolfgang Bangerth
>Release: unknown-1.0
>Organization:
>Environment:
present mainline
>Description:
Nathan, I believe that this started with your patch from
2003-03-22 fixing PRs 9978 and 9708. Here's a little piece
extracted from boost that since breaks building my library:
-----------------------------
template <bool B> struct X {
struct I {};
};
template <typename T> struct Y {
static const bool selector = true;
typedef typename X<selector>::I helper;
};
Y<int> i;
--------------------------------
With this I get
deal.II/base> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c y.cc
y.cc: In instantiation of `X<Y<T>::selector>':
y.cc:7: instantiated from here
y.cc:1: error: integral expression `Y<T>::selector' is not constant
y.cc:1: error: trying to instantiate `template<bool B> struct X'
y.cc:2: error: integral expression `Y<T>::selector' is not constant
y.cc:2: error: trying to instantiate `template<bool B> struct X'
y.cc:2: error: integral expression `Y<T>::selector' is not constant
y.cc:2: error: trying to instantiate `template<bool B> struct X<B>::I'
y.cc:2: error: integral expression `Y<T>::selector' is not constant
y.cc:2: error: trying to instantiate `template<bool B> struct X'
y.cc:2: error: integral expression `Y<T>::selector' is not constant
y.cc:2: error: trying to instantiate `template<bool B> struct X<B>::I'
y.cc:2: internal compiler error: in instantiate_class_template, at cp/pt.c:5391
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
I'm not so much concerned with the ICE, which I don't get
on my code, but with the handling of integral constants. I'm
pretty sure the code should actually compile.
W.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list