This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/36734] Incorrect access to tyedef in base of template class.
- From: "gcc-bugzilla at contacts dot eelis dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Aug 2008 11:35:02 -0000
- Subject: [Bug c++/36734] Incorrect access to tyedef in base of template class.
- References: <bug-36734-13452@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from gcc-bugzilla at contacts dot eelis dot net 2008-08-21 11:35 -------
It seems access control for templates is broken at a more basic level than the
reporter's testcase suggests; witness the following simplified testcase:
class A { typedef int X; };
template <typename> struct B { A::X x; };
B<int> b;
Again, g++ does not complain. Comeau rightly rejects the code, complaining that
A::X is inaccessible.
--
gcc-bugzilla at contacts dot eelis dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gcc-bugzilla at contacts dot
| |eelis dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36734