public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/27483] New: Pointer to protected member
@ 2006-05-08 10:30 wolfgang dot roehrl at gi-de dot com
2006-05-08 10:50 ` [Bug c++/27483] " rguenth at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: wolfgang dot roehrl at gi-de dot com @ 2006-05-08 10:30 UTC (permalink / raw)
To: gcc-bugs
Dear all,
I would like to post a bug report for the GNU C/C++ compiler 3.3-e500.
We use the compiler to generate code for a PowerPC processor.
Used invokation line for the GNU C++ compiler:
ccppc -c -x c++ -ansi -Wall -Werror -mcpu=8540 -fverbose-asm -mbig
-fmerge-templates -mmultiple -mno-string -mstrict-align -O3
-fno-exceptions -fno-rtti -fno-builtin-printf
-I<some include paths>
-D<some #define's>
X.CPP -oX.O
// file X.CPP
struct B
{
protected:
void f (int);
};
void g (void (B::*)(int));
struct D : B
{
void h1 () const { g (&B::f); } // <--- line 11 (illegal)
void h2 () const { g (&D::f); } // <--- line 12 (legal)
};
The compiler ignores that line 11 is illegal with respect to 11.5/1: "If the
access is to form a pointer to member, the nested-name-specifier shall name
the derived class (or any class derived from that class)."
Kind regards
W. Roehrl
--
Summary: Pointer to protected member
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: wolfgang dot roehrl at gi-de dot com
GCC build triplet: sparc-sun-solaris2.5.1
GCC host triplet: i386-pc-mingw32
GCC target triplet: powerpc-wrs-vxworks
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27483
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-05-08 10:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-08 10:30 [Bug c++/27483] New: Pointer to protected member wolfgang dot roehrl at gi-de dot com
2006-05-08 10:50 ` [Bug c++/27483] " rguenth 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).