public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/38962] New: using declaration doesn't control accessibility in template
@ 2009-01-24 19:59 jm at bourguet dot org
2009-01-26 19:14 ` [Bug c++/38962] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: jm at bourguet dot org @ 2009-01-24 19:59 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1268 bytes --]
This code:
struct B1 {
void f(int*);
};
struct B2 {
void f(double*);
};
struct D: B1, B2 {
private:
using B1::f;
using B2::f;
};
template <typename T>
struct B
{
public:
void f(T arg);
};
template <typename T, typename U>
struct DD: B<T>, B<U>
{
private:
using B<T>::f;
using B<U>::f;
};
int main()
{
D d;
d.f((int*)0);
DD<int*, double*> dd;
dd.f((int*)0);
}
Has the following error when compiling:
$ g++-4.3 -pedantic-errors -Wall -Wextra usingdecl.cpp
usingdecl.cpp: In function int main():
usingdecl.cpp:2: error: void B1::f(int*) is inaccessible
usingdecl.cpp:34: error: within this context
I thing there should be the same error line 36 (for the call to dd.f).
About versions: g++ 3.3 doesn't give any error. 3.4 and 4.0 gives both. The
reported state is the behaviour since 4.1.
--
Summary: using declaration doesn't control accessibility in
template
Product: gcc
Version: 4.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jm at bourguet dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38962
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/38962] using declaration doesn't control accessibility in template
2009-01-24 19:59 [Bug c++/38962] New: using declaration doesn't control accessibility in template jm at bourguet dot org
@ 2009-01-26 19:14 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-01-26 19:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2009-01-26 19:13 -------
*** This bug has been marked as a duplicate of 30195 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38962
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-01-26 19:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-24 19:59 [Bug c++/38962] New: using declaration doesn't control accessibility in template jm at bourguet dot org
2009-01-26 19:14 ` [Bug c++/38962] " pinskia 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).