[Bug c++/41050] Placement new not seeing base class protected functions

2009-08-13 Thread redi at gcc dot gnu dot org
--- Comment #4 from redi at gcc dot gnu dot org 2009-08-13 10:59 --- (In reply to comment #2) > Well, if the call is on foo then surely a foo can call; its own methods, Yes, a foo can call its own methods, but a bar can only call them through a bar object, not on an object with static t

[Bug c++/41050] Placement new not seeing base class protected functions

2009-08-13 Thread rguenth at gcc dot gnu dot org
--- Comment #3 from rguenth at gcc dot gnu dot org 2009-08-13 08:42 --- EDG rejects it as well: t.C(12): error #453: protected function "foo::foo(int)" (declared at line 5) is not accessible through a "foo" pointer or object new (this) foo(5); ^ compilatio

[Bug c++/41050] Placement new not seeing base class protected functions

2009-08-12 Thread igodard at pacbell dot net
--- Comment #2 from igodard at pacbell dot net 2009-08-13 02:47 --- Well, if the call is on foo then surely a foo can call; its own methods, whereas if the call is on bar then a bar should see the protected methods of its base class foo. Either way it should be visible. -- http://gc

[Bug c++/41050] Placement new not seeing base class protected functions

2009-08-12 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2009-08-13 02:42 --- I think this is correct as you are not calling a protected method on this but a new object that is created from this. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41050