------- Comment #15 from rguenther at suse dot de  2008-01-16 09:23 -------
Subject: Re:  [4.1/4.2/4.3 Regression] templates, enumerations,
 overflow, ice

On Tue, 15 Jan 2008, tbptbp at gmail dot com wrote:

> ------- Comment #14 from tbptbp at gmail dot com  2008-01-15 20:07 -------
> I keep bumping into this issue and i'd really appreciate a clue about how to
> workaround for the time being.

As of the analysis, try to avoid non-dependent enum members that
double- (or more) -indirectly depends on a dependent enum member.
For example by propagating the value manually.

Like instead of

template <int i>
struct foo {
  enum { a = i, b = a+1, c = b+2 }

do

  enum { a = i, b = i+1, c = i+3 }

Richard.


-- 


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

Reply via email to