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]

Access rights in egcs-1.1.1 ...



Hallo everybody !

It seems as if I found a bug in the way egcs/gcc treat accessibility of types 
defined within a class. 
The following example compiles without an error or warning with egcs-1.1.1, 
g++-2.7.2 and g++-2.8.0:

eg++ -c -Wall -W -Woverloaded-virtual -ansi -pedantic access.cc

class BASE

{       class INNER
        {
        };
};

int main ()

{       BASE::INNER     inn; 
}


However, using cxx on a DEC-OSF1 yields:

cxx -c access.cc

cxx: Error: access.cc, line 5: class "BASE::INNER" is inaccessible
{       BASE::INNER     inn; 
--------------^

regards,
Tom
-- 
"Computers are like air conditioners - they stop working properly when you open
 Windows"
                            \\\|///
                          \\  ~ ~  //
                           (  @ @  )
/------------------------oOOo-(_)-oOOo-----------------------------------------\
| Thomas Binder                        |                                       |
| Institute for  Microelectronics      | phone: ++43/1/58801-36036             |
| Technical University Vienna          |                                       |
| Gusshausstrasse  27-29 / E360        | fax  : ++43/1/58801-36099             |
| A-1040  Vienna                       |                                       |
| A U S T R I A                        | email: binder@iue.tuwien.ac.at        |
\---------------------------------Oooo.----------------------------------------/
                        .oooO     (   )
                        (   )      ) /
                         \ (      (_/
                          \_)


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