This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/34774] [4.1/4.2/4.3 Regression] templates, enumerations, overflow, ice
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Jan 2008 12:45:54 -0000
- Subject: [Bug c++/34774] [4.1/4.2/4.3 Regression] templates, enumerations, overflow, ice
- References: <bug-34774-9709@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from rguenth at gcc dot gnu dot org 2008-01-14 12:45 -------
Reduced testcase:
template<int shifts>
struct shift {
enum {
n0 = (unsigned)shifts,
n = n0 ? 0 : n0,
n_comp = -n
} x;
};
it looks like we substitute n into -n but do not stop substituting once
we hit a dependent expression (n0).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34774