public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/35650]  New: Can't bind ref-to-function through using-decl. in namespace
@ 2008-03-20 18:07 gcc-bugzilla at contacts dot eelis dot net
  2008-03-20 19:56 ` [Bug c++/35650] [4.1/4.2/4.3/4.4 Regression] " rguenth at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: gcc-bugzilla at contacts dot eelis dot net @ 2008-03-20 18:07 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 846 bytes --]

Consider:

  void f();
  namespace N { using ::f; }

  void h()
  {
    void (& a)() = f; // ok
    void (& b)() = N::f;
      // error: invalid initialization of non-const reference of
      // type ‘void (&)()’ from a temporary of type ‘void ()()’
  }

Since in h, f and N::f are simply two ways of naming the same function, the
error seems unwarranted to me.

Comeau 4.3.9 accepts the code.


-- 
           Summary: Can't bind ref-to-function through using-decl. in
                    namespace
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gcc-bugzilla at contacts dot eelis dot net


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


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

* [Bug c++/35650] [4.1/4.2/4.3/4.4 Regression] Can't bind ref-to-function through using-decl. in namespace
  2008-03-20 18:07 [Bug c++/35650] New: Can't bind ref-to-function through using-decl. in namespace gcc-bugzilla at contacts dot eelis dot net
@ 2008-03-20 19:56 ` rguenth at gcc dot gnu dot org
  2008-03-25 19:03 ` bangerth at dealii dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-03-20 19:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2008-03-20 19:55 -------
Confirmed.  Fails since 3.4.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |rejects-valid
      Known to fail|                            |3.4.6
      Known to work|                            |3.3.6
   Last reconfirmed|0000-00-00 00:00:00         |2008-03-20 19:55:23
               date|                            |
            Summary|Can't bind ref-to-function  |[4.1/4.2/4.3/4.4 Regression]
                   |through using-decl. in      |Can't bind ref-to-function
                   |namespace                   |through using-decl. in
                   |                            |namespace
   Target Milestone|---                         |4.1.3


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


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

* [Bug c++/35650] [4.1/4.2/4.3/4.4 Regression] Can't bind ref-to-function through using-decl. in namespace
  2008-03-20 18:07 [Bug c++/35650] New: Can't bind ref-to-function through using-decl. in namespace gcc-bugzilla at contacts dot eelis dot net
  2008-03-20 19:56 ` [Bug c++/35650] [4.1/4.2/4.3/4.4 Regression] " rguenth at gcc dot gnu dot org
@ 2008-03-25 19:03 ` bangerth at dealii dot org
  2008-03-31  9:42 ` rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: bangerth at dealii dot org @ 2008-03-25 19:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from bangerth at dealii dot org  2008-03-25 19:02 -------
Confirmed again. Funny enough, this works:
-----------------
void f();
namespace N { using ::f; }

void h()
{
  void (& b)() = N::f;   // not ok
  void (& c)() = *&N::f; // ok!?
}
-----------------

W.


-- 

bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bangerth at dealii dot org


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


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

* [Bug c++/35650] [4.1/4.2/4.3/4.4 Regression] Can't bind ref-to-function through using-decl. in namespace
  2008-03-20 18:07 [Bug c++/35650] New: Can't bind ref-to-function through using-decl. in namespace gcc-bugzilla at contacts dot eelis dot net
  2008-03-20 19:56 ` [Bug c++/35650] [4.1/4.2/4.3/4.4 Regression] " rguenth at gcc dot gnu dot org
  2008-03-25 19:03 ` bangerth at dealii dot org
@ 2008-03-31  9:42 ` rguenth at gcc dot gnu dot org
  2008-04-22  7:38 ` jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-03-31  9:42 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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


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

* [Bug c++/35650] [4.1/4.2/4.3/4.4 Regression] Can't bind ref-to-function through using-decl. in namespace
  2008-03-20 18:07 [Bug c++/35650] New: Can't bind ref-to-function through using-decl. in namespace gcc-bugzilla at contacts dot eelis dot net
                   ` (2 preceding siblings ...)
  2008-03-31  9:42 ` rguenth at gcc dot gnu dot org
@ 2008-04-22  7:38 ` jakub at gcc dot gnu dot org
  2008-04-29  8:59 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-04-22  7:38 UTC (permalink / raw)
  To: gcc-bugs



-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2008-
                   |                            |04/msg01609.html
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2008-03-20 19:55:23         |2008-04-22 07:37:27
               date|                            |


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


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

* [Bug c++/35650] [4.1/4.2/4.3/4.4 Regression] Can't bind ref-to-function through using-decl. in namespace
  2008-03-20 18:07 [Bug c++/35650] New: Can't bind ref-to-function through using-decl. in namespace gcc-bugzilla at contacts dot eelis dot net
                   ` (3 preceding siblings ...)
  2008-04-22  7:38 ` jakub at gcc dot gnu dot org
@ 2008-04-29  8:59 ` jakub at gcc dot gnu dot org
  2008-04-29  9:00 ` jakub at gcc dot gnu dot org
  2008-04-29  9:07 ` jakub at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-04-29  8:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jakub at gcc dot gnu dot org  2008-04-29 08:59 -------
Subject: Bug 35650

Author: jakub
Date: Tue Apr 29 08:58:20 2008
New Revision: 134788

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134788
Log:
        PR c++/35650
        * parser.c (cp_parser_lookup_name): Look through single function
        OVERLOAD.

        * g++.dg/init/ref17.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/init/ref17.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/35650] [4.1/4.2/4.3/4.4 Regression] Can't bind ref-to-function through using-decl. in namespace
  2008-03-20 18:07 [Bug c++/35650] New: Can't bind ref-to-function through using-decl. in namespace gcc-bugzilla at contacts dot eelis dot net
                   ` (4 preceding siblings ...)
  2008-04-29  8:59 ` jakub at gcc dot gnu dot org
@ 2008-04-29  9:00 ` jakub at gcc dot gnu dot org
  2008-04-29  9:07 ` jakub at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-04-29  9:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jakub at gcc dot gnu dot org  2008-04-29 08:59 -------
Subject: Bug 35650

Author: jakub
Date: Tue Apr 29 08:58:58 2008
New Revision: 134789

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134789
Log:
        PR c++/35650
        * parser.c (cp_parser_lookup_name): Look through single function
        OVERLOAD.

        * g++.dg/init/ref17.C: New test.

Added:
    branches/gcc-4_3-branch/gcc/testsuite/g++.dg/init/ref17.C
Modified:
    branches/gcc-4_3-branch/gcc/cp/ChangeLog
    branches/gcc-4_3-branch/gcc/cp/parser.c
    branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/35650] [4.1/4.2/4.3/4.4 Regression] Can't bind ref-to-function through using-decl. in namespace
  2008-03-20 18:07 [Bug c++/35650] New: Can't bind ref-to-function through using-decl. in namespace gcc-bugzilla at contacts dot eelis dot net
                   ` (5 preceding siblings ...)
  2008-04-29  9:00 ` jakub at gcc dot gnu dot org
@ 2008-04-29  9:07 ` jakub at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-04-29  9:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jakub at gcc dot gnu dot org  2008-04-29 09:06 -------
Fixed.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2008-04-29  9:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-20 18:07 [Bug c++/35650] New: Can't bind ref-to-function through using-decl. in namespace gcc-bugzilla at contacts dot eelis dot net
2008-03-20 19:56 ` [Bug c++/35650] [4.1/4.2/4.3/4.4 Regression] " rguenth at gcc dot gnu dot org
2008-03-25 19:03 ` bangerth at dealii dot org
2008-03-31  9:42 ` rguenth at gcc dot gnu dot org
2008-04-22  7:38 ` jakub at gcc dot gnu dot org
2008-04-29  8:59 ` jakub at gcc dot gnu dot org
2008-04-29  9:00 ` jakub at gcc dot gnu dot org
2008-04-29  9:07 ` jakub 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).