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]

[Bug c++/20098] Unresolved dependent "static const" symbol in template


------- 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


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