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]

Re: c++/7181: foo<n>::bar = foo<n-1>::bar + foo<n-2>::bar evaluatesto zero at compile time


Nickolai Dobrynin wrote:

I just think of it as being totally counter intuitive that the same nifty
feature is not valid (is NO LONGER valid, would be a better way to say it)
on non-constant initializers.

So, would indeed this be possible to restore the behavior of 2.95.x or it
would come in conflict with something else? Any opinions on that?

Nicolai, first thanks for your message from which I have learned much about the issue at hand. On the other hand, I think that Mark's answer stands: if the standard does /not/ prescribe a particular ordering this cannot be considered a bug and, moreover, yourself proved that there is a way (thanks, once more) to do this kind of tricks which does /not/ relies on not well-defined behavior. The latter two points imply that most probably the old behaviour will not be restored very soon ;-)


PS  Is it a normal behavior that the option -ftemplate-depth-... is no
longer needed in order for the example above to compile properly?

Yes. Currently the default max depth is 500:

2002-01-10  Jakub Jelinek  <jakub@redhat.com>

   * decl2.c (max_tinst_depth): Increase default limit to 500.

Ciao,
Paolo.



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