This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/20098] Unresolved dependent "static const" symbol in template
- From: "wwieser at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Feb 2005 00:31:08 -0000
- Subject: [Bug c++/20098] Unresolved dependent "static const" symbol in template
- References: <20050220001048.20098.wwieser@gmx.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From wwieser at gmx dot de 2005-02-20 00:31 -------
Subject: Re: Unresolved dependent "static const" symbol in template
Thanks for a REALLY quick reply!
template<typename T>struct A
{
static const T all_clr = T(0);
static const T all_set = ~all_clr;
};
int main()
{
A<int> bf;
return(bf.all_set);
}
On Sunday 20 February 2005 01:12, pinskia at gcc dot gnu dot org wrote:
> Note the testcase is invalid code,
>
Could you please elaborate on what exactly is invalid?
> this is only a missed optimization.
>
(?? - The unresolved symbol is independent of the optimization level.)
Regards,
Wolfgang
------- Additional Comments From wwieser at gmx dot de 2005-02-20 00:31 -------
Subject: Re: Unresolved dependent "static const" symbol in template
Thanks for a REALLY quick reply!
template<typename T>struct A
{
static const T all_clr = T(0);
static const T all_set = ~all_clr;
};
int main()
{
A<int> bf;
return(bf.all_set);
}
On Sunday 20 February 2005 01:12, pinskia at gcc dot gnu dot org wrote:
> Note the testcase is invalid code,
>
Could you please elaborate on what exactly is invalid?
> this is only a missed optimization.
>
(?? - The unresolved symbol is independent of the optimization level.)
Regards,
Wolfgang
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20098