public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/21008] New: Acess failure in accessing data member of base class from derived template class
@ 2005-04-13 21:50 nicoara at roguewave dot com
  2005-04-13 22:04 ` [Bug c++/21008] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 16+ messages in thread
From: nicoara at roguewave dot com @ 2005-04-13 21:50 UTC (permalink / raw)
  To: gcc-bugs

$ uname -srm
Linux 2.6.11.4 i686

$ g++ -v
Reading specs from /opt/compilers/gcc-3.4.3/lib/gcc/i686-pc-linux-gnu/3.4.3/specs
Configured with: ../gcc-3.4.3/configure --prefix=/opt/compilers/gcc-3.4.3
--enable-shared --enable-threads --enable-languages=c,c++
Thread model: posix
gcc version 3.4.3


Copy and paste at prompt:

$ cat > t.cpp << EOF

struct A
{
protected:
    int foo_;
};


template <class T>
struct B : public A
{
};

template <class T>
struct C : protected B<T>
{
    int foo () {
        return A::foo_;
    }
};
 
EOF

Compilation of the above with:

$ g++ -c t.cpp

results in:

t.cpp: In member function `int C<T>::foo()':
t.cpp:4: error: object missing in reference to `A::foo_'
t.cpp:17: error: from this location

Thanks,
Liviu

-- 
           Summary: Acess failure in accessing data member of base class
                    from derived template class
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: nicoara at roguewave dot com
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21008


^ permalink raw reply	[flat|nested] 16+ messages in thread
[parent not found: <bug-21008-10428@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2005-10-30 23:20 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-13 21:50 [Bug c++/21008] New: Acess failure in accessing data member of base class from derived template class nicoara at roguewave dot com
2005-04-13 22:04 ` [Bug c++/21008] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-04-15  5:29 ` bangerth at dealii dot org
2005-04-19 15:39 ` sebor at roguewave dot com
2005-04-19 15:41 ` sebor at roguewave dot com
2005-04-19 18:25 ` bangerth at dealii dot org
2005-04-20 19:51 ` william dot m dot miller at gmail dot com
2005-04-20 20:14 ` william dot m dot miller at gmail dot com
2005-04-30 16:04 ` lerdsuwa at gcc dot gnu dot org
2005-05-19 16:45 ` [Bug c++/21008] [3.4/4.0/4.1 Regression] [DR515] Access " lerdsuwa at gcc dot gnu dot org
2005-05-19 17:30 ` mmitchel at gcc dot gnu dot org
2005-07-06 17:03 ` mmitchel at gcc dot gnu dot org
2005-09-27 16:05 ` mmitchel at gcc dot gnu dot org
     [not found] <bug-21008-10428@http.gcc.gnu.org/bugzilla/>
2005-10-17 14:50 ` pinskia at gcc dot gnu dot org
2005-10-17 14:51 ` pinskia at gcc dot gnu dot org
2005-10-30 23:22 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).