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++/34774] [4.1/4.2/4.3 Regression] templates, enumerations, overflow, ice



------- 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


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