public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53247] New: [regression, c++11] can't use a function from a base class of the same name in a different namespace
@ 2012-05-05 16:32 b.r.longbons at gmail dot com
  2012-05-05 17:58 ` [Bug c++/53247] " redi at gcc dot gnu.org
  2012-05-05 18:00 ` fabien at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: b.r.longbons at gmail dot com @ 2012-05-05 16:32 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53247

             Bug #: 53247
           Summary: [regression, c++11] can't use a function from a base
                    class of the same name in a different namespace
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: b.r.longbons@gmail.com


Created attachment 27318
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27318
testcase

With gcc 4.7 and -std=c++11, 
the 'using' statement fails to bring in a function from the base class into the
current class. This is useful to prevent hiding.

Error message:
base.cpp:12:19: error: type ‘A’ is not a base type for type ‘A’

Workaround:
Create a new member function and explicitly call the base class function.

Versions tested:
Arch gcc (GCC) 4.7.0 20120114 (prerelease)
gcc-4.7 (Debian 4.7.0-3) 4.7.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/53247] [regression, c++11] can't use a function from a base class of the same name in a different namespace
  2012-05-05 16:32 [Bug c++/53247] New: [regression, c++11] can't use a function from a base class of the same name in a different namespace b.r.longbons at gmail dot com
@ 2012-05-05 17:58 ` redi at gcc dot gnu.org
  2012-05-05 18:00 ` fabien at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2012-05-05 17:58 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53247

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fabien at gcc dot gnu.org

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-05-05 17:43:01 UTC ---
Fabien, is this a dup of one of the other "using" regressions?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/53247] [regression, c++11] can't use a function from a base class of the same name in a different namespace
  2012-05-05 16:32 [Bug c++/53247] New: [regression, c++11] can't use a function from a base class of the same name in a different namespace b.r.longbons at gmail dot com
  2012-05-05 17:58 ` [Bug c++/53247] " redi at gcc dot gnu.org
@ 2012-05-05 18:00 ` fabien at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: fabien at gcc dot gnu.org @ 2012-05-05 18:00 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53247

fabien at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #2 from fabien at gcc dot gnu.org 2012-05-05 17:57:27 UTC ---
(In reply to comment #1)
> Fabien, is this a dup of one of the other "using" regressions?

Definitely, this is a duplicate, thanks.

*** This bug has been marked as a duplicate of bug 52841 ***


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-05 17:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-05 16:32 [Bug c++/53247] New: [regression, c++11] can't use a function from a base class of the same name in a different namespace b.r.longbons at gmail dot com
2012-05-05 17:58 ` [Bug c++/53247] " redi at gcc dot gnu.org
2012-05-05 18:00 ` fabien 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).