public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "wolfgang.roehrl@gi-de.com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/50097] New: Private base class enumeration Date: Tue, 16 Aug 2011 11:53:00 -0000 [thread overview] Message-ID: <bug-50097-4@http.gcc.gnu.org/bugzilla/> (raw) 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
next reply other threads:[~2011-08-16 11:47 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-08-16 11:53 wolfgang.roehrl@gi-de.com [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-50097-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).