This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/34810] accepts invalid dependent(?) type in template class method
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jan 2008 13:26:37 -0000
- Subject: [Bug c++/34810] accepts invalid dependent(?) type in template class method
- References: <bug-34810-629@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from rguenth at gcc dot gnu dot org 2008-01-16 13:26 -------
EDG rejects this with
t.C(6): error: class template "Foo<T>" has no member "Foo"
typename Foo<T>::Foo ();
^
G++ accepts this even if you instantiate Foo. G++ also accepts
template <typename T>
struct Foo
{
void bar ()
{
typename Foo<T>::Foox ();
}
};
but rejects that once you instantiate Foo.
template struct Foo<int>;
It looks like EDG does not treat Foo<T>::Fox as dependent?
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |accepts-invalid
Last reconfirmed|0000-00-00 00:00:00 |2008-01-16 13:26:36
date| |
Summary|G++ accepts wrong code |accepts invalid dependent(?)
| |type in template class
| |method
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34810