public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/25950]  New: Reference binding and explicit copy constructors
@ 2006-01-24 22:24 hhinnant at apple dot com
  2006-01-24 22:38 ` [Bug c++/25950] [DR 391] " pinskia at gcc dot gnu dot org
                   ` (32 more replies)
  0 siblings, 33 replies; 35+ messages in thread
From: hhinnant at apple dot com @ 2006-01-24 22:24 UTC (permalink / raw)
  To: gcc-bugs

Consider:

   struct X {
      X();
      explicit X(const X&);
   };

void f(X);
void g(const X&);

int main()
{
    X x;
    f(x);
    f(X());
    g(x);
    g(X());
}

We currently give errors for f(x), f(X()) and g(X()), but not g(x).  This is
not quite the behavior of EDG which allows g(X()).

There are (at least) two pertinent cwg defect reports:  152 and 391.  152 has
TC1 status (it is normative) and clarifies the behavior for f(), and is
consistent with the bevavior of both gcc and EDG.  Issue 391 addresses g() and
(I believe) explains the discrepancy between gcc and EDG by specifying that X()
will bind directly to the reference parameter of g() with no copy.

This issue has been voted on in full committee and approved as a dr.  However
the next available time to make anything normative is C++0X.  So 391 has been
applied to the working draft, and EDG has apparently implemented it.

I respectfully request that gcc implement it as well.  The issue is
non-controversial on the committee and is causing problems with client code
today.


-- 
           Summary: Reference binding and explicit copy constructors
           Product: gcc
           Version: 4.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hhinnant at apple dot com


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


^ permalink raw reply	[flat|nested] 35+ messages in thread
[parent not found: <bug-25950-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2014-02-16 10:03 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-24 22:24 [Bug c++/25950] New: Reference binding and explicit copy constructors hhinnant at apple dot com
2006-01-24 22:38 ` [Bug c++/25950] [DR 391] " pinskia at gcc dot gnu dot org
2006-01-24 22:48 ` [Bug c++/25950] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2006-01-24 22:51 ` hhinnant at apple dot com
2006-01-25  1:32 ` gdr at cs dot tamu dot edu
2006-01-25  1:55 ` pinskia at gcc dot gnu dot org
2006-01-25  2:05 ` hhinnant at apple dot com
2006-01-25  2:38 ` gdr at cs dot tamu dot edu
2006-01-25  2:41 ` [Bug c++/25950] [3.4/4.0/4.1] " gdr at gcc dot gnu dot org
2006-01-25  2:54 ` hhinnant at apple dot com
2006-01-25  3:03 ` [Bug c++/25950] [3.4/4.0/4.1 Regression] [DR 152] " pinskia at gcc dot gnu dot org
2006-01-25  3:10 ` gdr at cs dot tamu dot edu
2006-01-25  3:20 ` [Bug c++/25950] [3.4/4.0/4.1] [DR 392] " gdr at gcc dot gnu dot org
2006-01-25  3:20 ` [Bug c++/25950] [3.4/4.0/4.1 Regression] [DR 152] " gdr at cs dot tamu dot edu
2006-01-25  3:24 ` [Bug c++/25950] [3.4/4.0/4.1] [DR 392] " hhinnant at apple dot com
2006-01-25  3:28 ` [Bug c++/25950] [3.4/4.0/4.1] [DR 391] " gdr at gcc dot gnu dot org
2006-01-25  3:35 ` pinskia at gcc dot gnu dot org
2006-01-25  3:41 ` gdr at cs dot tamu dot edu
2006-01-25  6:46 ` mmitchel at gcc dot gnu dot org
2006-01-25 15:51 ` gdr at cs dot tamu dot edu
2006-02-24  0:30 ` mmitchel at gcc dot gnu dot org
2006-04-05  7:10 ` pinskia at gcc dot gnu dot org
2006-04-24 23:37 ` pinskia at gcc dot gnu dot org
2006-05-25  2:37 ` mmitchel at gcc dot gnu dot org
2006-07-12 23:11 ` pinskia at gcc dot gnu dot org
2006-08-25 17:41 ` pinskia at gcc dot gnu dot org
2007-02-14  9:09 ` mmitchel at gcc dot gnu dot org
2007-02-25 16:50 ` [Bug c++/25950] " pinskia at gcc dot gnu dot org
2007-03-12 22:00 ` pinskia at gcc dot gnu dot org
2007-10-22 19:14 ` jason at gcc dot gnu dot org
2007-10-24  3:46 ` jason at gcc dot gnu dot org
2007-11-03 13:40 ` jason at gcc dot gnu dot org
2008-07-04 19:32 ` jsm28 at gcc dot gnu dot org
2008-07-31  7:04 ` pinskia at gcc dot gnu dot org
     [not found] <bug-25950-4@http.gcc.gnu.org/bugzilla/>
2014-02-16 10:03 ` jackie.rosen at hushmail dot com

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).