public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/35640]  New: invalid access to protected base class
@ 2008-03-19 17:25 mrs at apple dot com
  2008-12-29  4:16 ` [Bug c++/35640] [4.2/4.3/4.4 Regression] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: mrs at apple dot com @ 2008-03-19 17:25 UTC (permalink / raw)
  To: gcc-bugs

class A {
        };

        class B: protected A {
        };

        class C: protected A {
        public:
            C(B & b);
        };

        C::C(B & b)
        : A(b)
        {
        }

        int main() {
            B b;
            C c(b);
            return 0;
        }

should give an error for : A(b), the conversion from B to A is invalid as A is
protected.

This still fails on 4.4.0 20080317

radr://5805511


-- 
           Summary: invalid access to protected base class
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mrs at apple dot com


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/35640] [4.2/4.3/4.4 Regression] invalid access to protected base class
  2008-03-19 17:25 [Bug c++/35640] New: invalid access to protected base class mrs at apple dot com
@ 2008-12-29  4:16 ` pinskia at gcc dot gnu dot org
  2008-12-29 21:33 ` rguenth at gcc dot gnu dot org
  2009-01-16 18:58 ` jason at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-29  4:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2008-12-29 04:13 -------
Confirmed, a regression from at least 3.3 which gave:
t.cc: In constructor `C::C(B&)':
t.cc:14: error: `A' is an inaccessible base of `B'


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |accepts-invalid
      Known to fail|                            |4.0.1 4.3.3 4.4.0
      Known to work|                            |3.3
   Last reconfirmed|0000-00-00 00:00:00         |2008-12-29 04:13:13
               date|                            |
            Summary|invalid access to protected |[4.2/4.3/4.4 Regression]
                   |base class                  |invalid access to protected
                   |                            |base class
   Target Milestone|---                         |4.2.5


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/35640] [4.2/4.3/4.4 Regression] invalid access to protected base class
  2008-03-19 17:25 [Bug c++/35640] New: invalid access to protected base class mrs at apple dot com
  2008-12-29  4:16 ` [Bug c++/35640] [4.2/4.3/4.4 Regression] " pinskia at gcc dot gnu dot org
@ 2008-12-29 21:33 ` rguenth at gcc dot gnu dot org
  2009-01-16 18:58 ` jason at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-12-29 21:33 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/35640] [4.2/4.3/4.4 Regression] invalid access to protected base class
  2008-03-19 17:25 [Bug c++/35640] New: invalid access to protected base class mrs at apple dot com
  2008-12-29  4:16 ` [Bug c++/35640] [4.2/4.3/4.4 Regression] " pinskia at gcc dot gnu dot org
  2008-12-29 21:33 ` rguenth at gcc dot gnu dot org
@ 2009-01-16 18:58 ` jason at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-01-16 18:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jason at gcc dot gnu dot org  2009-01-16 18:58 -------


*** This bug has been marked as a duplicate of 38579 ***


-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-01-16 18:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-19 17:25 [Bug c++/35640] New: invalid access to protected base class mrs at apple dot com
2008-12-29  4:16 ` [Bug c++/35640] [4.2/4.3/4.4 Regression] " pinskia at gcc dot gnu dot org
2008-12-29 21:33 ` rguenth at gcc dot gnu dot org
2009-01-16 18:58 ` jason 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).