public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/50097] New: Private base class enumeration
@ 2011-08-16 11:53 wolfgang.roehrl@gi-de.com
  2011-08-16 11:55 ` [Bug c++/50097] " redi at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: wolfgang.roehrl@gi-de.com @ 2011-08-16 11:53 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50097
           Summary: Private base class enumeration
    Classification: Unclassified
           Product: gcc
           Version: 4.5.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: wolfgang.roehrl@gi-de.com


Hi all,

I would like to post a bug report for the GNU C/C++ compiler version 4.5.2
(powerpc-rtems4.11).

We use the compiler to generate code for a PowerPC processor.

The compiler is invoked with the following options:

ccppc -c -x c++ -ansi -Wall -Werror -g -mcpu=8540 -fverbose-asm -mbig
      -mfloat-gprs=double -mspe -mabi=spe -meabi -msdata -fno-common
      -mmultiple -mno-string -misel -mstrict-align -fgcse-sm
      -fno-rename-registers -fno-section-anchors -G 8 -Os
      -fno-exceptions -fno-rtti
      -I<some include paths>
      -D<some #define's>
      X.CPP -oX.O

// file X.CPP

class X
{
    enum E { E1, E2 };
public:
    void f1 (E);
};

template <typename T_>
struct Y : private X
{
    void f2 ();
};


template <typename T_>
void Y<T_>::f2 ()
{ this->f1 (X::E1); }     // <--- accessing private enum of X

Y<int> y;

void f3 ()
{ y.f2 (); }


The code compiles fine even though function Y<>::f2() accesses the private
X::E1 enumerator.

BTW, Comeau online rejects the code above.

Kind regards
W. Roehrl


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

* [Bug c++/50097] Private base class enumeration
  2011-08-16 11:53 [Bug c++/50097] New: Private base class enumeration wolfgang.roehrl@gi-de.com
@ 2011-08-16 11:55 ` redi at gcc dot gnu.org
  2011-08-16 12:12 ` redi at gcc dot gnu.org
  2011-10-18 11:31 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2011-08-16 11:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-08-16 11:53:16 UTC ---
this is a duplicate of at least one of these bugs:
http://gcc.gnu.org/bugzilla/buglist.cgi?list_id=653&short_desc=access
template&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&short_desc_type=allwordssubstr&component=c%2B%2B&product=gcc


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

* [Bug c++/50097] Private base class enumeration
  2011-08-16 11:53 [Bug c++/50097] New: Private base class enumeration wolfgang.roehrl@gi-de.com
  2011-08-16 11:55 ` [Bug c++/50097] " redi at gcc dot gnu.org
@ 2011-08-16 12:12 ` redi at gcc dot gnu.org
  2011-10-18 11:31 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2011-08-16 12:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-08-16 11:55:08 UTC ---
bah, you'll need to copy that entire URL, bugzilla inserted linebreaks

it's probably PR 41437 or PR 47346


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

* [Bug c++/50097] Private base class enumeration
  2011-08-16 11:53 [Bug c++/50097] New: Private base class enumeration wolfgang.roehrl@gi-de.com
  2011-08-16 11:55 ` [Bug c++/50097] " redi at gcc dot gnu.org
  2011-08-16 12:12 ` redi at gcc dot gnu.org
@ 2011-10-18 11:31 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-18 11:31 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

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

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-18 11:31:06 UTC ---
Let's close as duplicate of PR47346, and let's ask Dodji to double check that
his ongoing work fixes this one too.

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


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

end of thread, other threads:[~2011-10-18 11:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-16 11:53 [Bug c++/50097] New: Private base class enumeration wolfgang.roehrl@gi-de.com
2011-08-16 11:55 ` [Bug c++/50097] " redi at gcc dot gnu.org
2011-08-16 12:12 ` redi at gcc dot gnu.org
2011-10-18 11:31 ` paolo.carlini at oracle dot com

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).