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: mmitchel 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: Tue, 02 Jul 2002 20:42:23 +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: <20020702183154.11694.qmail@sources.redhat.com>
mmitchel@gcc.gnu.org wrote:
>
> Synopsis: foo<n>::bar = foo<n-1>::bar + foo<n-2>::bar evaluates to zero at compile time
>
> State-Changed-From-To: analyzed->closed
> State-Changed-By: mmitchel
> State-Changed-When: Tue Jul 2 11:31:51 2002
> State-Changed-Why:
> This code does not have well-defined behavior.
How have you come to this conclusion? The last sentance of
[14.7.1]/1 indicates that we must instantiate the definition of Foo<N>::value.
I see nothing in [3.6.2] or [3.8] which disallows it.
Or are you saying this is a case of [14.7.3]/7?
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