public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/52766] New: unambiguous member lookup rejected
@ 2012-03-29 9:19 chrbr at gcc dot gnu.org
2012-03-29 10:36 ` [Bug c++/52766] " redi at gcc dot gnu.org
2012-03-29 10:46 ` chrbr at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: chrbr at gcc dot gnu.org @ 2012-03-29 9:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52766
Bug #: 52766
Summary: unambiguous member lookup rejected
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: chrbr@gcc.gnu.org
The following code (from 3.4.5-4 - class member access) is rejected:
struct A { int a; };
struct B: virtual A { };
struct C: B { };
struct D: B { };
struct E : public C, public D { };
void f()
{
E e;
e.B::a = 0;
}
f1.cxx: In function 'void f()':
f1.cxx:25:8: error: 'B' is an ambiguous base of 'E'
According to 10.2.5 (Member name lookup), member access e.B::a = 0 is OK
because there is only one "a" (virtual)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/52766] unambiguous member lookup rejected
2012-03-29 9:19 [Bug c++/52766] New: unambiguous member lookup rejected chrbr at gcc dot gnu.org
@ 2012-03-29 10:36 ` redi at gcc dot gnu.org
2012-03-29 10:46 ` chrbr at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2012-03-29 10:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52766
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-03-29 10:28:55 UTC ---
The example was wrong and is not in C++11
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#381
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/52766] unambiguous member lookup rejected
2012-03-29 9:19 [Bug c++/52766] New: unambiguous member lookup rejected chrbr at gcc dot gnu.org
2012-03-29 10:36 ` [Bug c++/52766] " redi at gcc dot gnu.org
@ 2012-03-29 10:46 ` chrbr at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: chrbr at gcc dot gnu.org @ 2012-03-29 10:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52766
chrbr at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #2 from chrbr at gcc dot gnu.org 2012-03-29 10:45:26 UTC ---
Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-03-29 10:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-29 9:19 [Bug c++/52766] New: unambiguous member lookup rejected chrbr at gcc dot gnu.org
2012-03-29 10:36 ` [Bug c++/52766] " redi at gcc dot gnu.org
2012-03-29 10:46 ` chrbr at gcc dot gnu.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).