[Bug c++/35370] New: Visibility of member of base template class lacking in derived template class

2008-02-25 Thread gcc-bugzilla at meta-dynamic dot com
Please forgive me if in fact this is standards-compliant behavior.

Code:

template class B
{
protected:
int f;
};

template class D : public B
{
public:
void a() { this->f = 0; } // OK
void b() {   f = 0; } // `f' was not declared in this scope
};

Compiled with command (gcc 4.2.1 as distributed on Ubuntu):
gcc-4.2 -c foo.cc

Produces error:
foo.cc: In member function ‘void D::b()’:
foo.cc:11: error: ‘f’ was not declared in this scope

Expected behavior:
Successful compilation (or, if this is in fact not legal, perhaps a more
specific diagnostic message)


-- 
   Summary: Visibility of member of base template class lacking in
derived template class
   Product: gcc
   Version: 4.2.1
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc-bugzilla at meta-dynamic dot com
GCC target triplet: i486-linux-gnu


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



[Bug c++/26295] New: Invalid namespace pointer seg fault

2006-02-14 Thread gcc-bugzilla at meta-dynamic dot com
Compiling this code:
namespace A { } ;
int (A::*B)();
With this command:
g++ --version ; g++ -c test-bug-1.cc
Produces this output:
g++ (GCC) 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu9)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

test-bug-1.cc:3: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see .

NOTE: I don't know if this is the most up-to-date version of the compiler; it
is the one that is distributed with my operating system.  I tried searching
existing bugs but didn't see this one; my apologies if it has already been
reported and/or fixed.


-- 
   Summary: Invalid namespace pointer seg fault
   Product: gcc
   Version: 4.0.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
    ReportedBy: gcc-bugzilla at meta-dynamic dot com


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