This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/7181: foo<n>::bar = foo<n-1>::bar + foo<n-2>::bar evaluates to zero at compile time
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: paolo at gcc dot gnu dot org, dobrynin at bigfoot dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
- Date: Mon, 01 Jul 2002 22:50:53 +0100
- Subject: Re: c++/7181: foo<n>::bar = foo<n-1>::bar + foo<n-2>::bar evaluates to zero at compile time
- Organization: Codesourcery LLC
- References: <20020701212006.8098.qmail@sources.redhat.com>
paolo@gcc.gnu.org wrote:
>
> Synopsis: foo<n>::bar = foo<n-1>::bar + foo<n-2>::bar evaluates to zero at
FYI, this is broken in 2.96RH too, so is quite old. The static initializers
are emitted in the wrong order so we initialize foo<n> before foo<n-1>. doh!
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org