public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/15079] New: Temporary pass by reference should not need copy ctor
@ 2004-04-22 21:38 david dot lee at teracruz dot com
  2004-04-22 21:42 ` [Bug c++/15079] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: david dot lee at teracruz dot com @ 2004-04-22 21:38 UTC (permalink / raw)
  To: gcc-bugs

The following code used to compile with gcc 3.3.  It 3.4 emits an error.

[dlee@lindb1 cpp]$ cat nocopy.cpp 
class Foo
{
  public:
    Foo(int) {}
  private:
    Foo(Foo const &);
    Foo&operator=(Foo const &);
};

void foobar(Foo const &);

int main()
{
  Foo const a(0);
  foobar(a);
  foobar(Foo(0)); // nocopy.cpp:6: error: `Foo::Foo(const Foo&)' is private
                  // nocopy.cpp:16: error: within this context
}

[dlee@lindb1 cpp]$ i686-linux-g++ nocopy.cpp -o /dev/null 
nocopy.cpp: In function `int main()':
nocopy.cpp:6: error: `Foo::Foo(const Foo&)' is private
nocopy.cpp:16: error: within this context

-- 
           Summary: Temporary pass by reference should not need copy ctor
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: david dot lee at teracruz dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux
  GCC host triplet: i686-pc-linux
GCC target triplet: i686-pc-linux


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


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

* [Bug c++/15079] Temporary pass by reference should not need copy ctor
  2004-04-22 21:38 [Bug c++/15079] New: Temporary pass by reference should not need copy ctor david dot lee at teracruz dot com
@ 2004-04-22 21:42 ` pinskia at gcc dot gnu dot org
  2004-08-27  8:48 ` pinskia at gcc dot gnu dot org
  2004-08-27  8:51 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-22 21:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-22 21:24 -------
http://gcc.gnu.org/bugs.html#cxx_rvalbind

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


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


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

* [Bug c++/15079] Temporary pass by reference should not need copy ctor
  2004-04-22 21:38 [Bug c++/15079] New: Temporary pass by reference should not need copy ctor david dot lee at teracruz dot com
  2004-04-22 21:42 ` [Bug c++/15079] " pinskia at gcc dot gnu dot org
@ 2004-08-27  8:48 ` pinskia at gcc dot gnu dot org
  2004-08-27  8:51 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-27  8:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-27 08:48 -------
Reopening bug to mark as a dup of ...

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


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


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

* [Bug c++/15079] Temporary pass by reference should not need copy ctor
  2004-04-22 21:38 [Bug c++/15079] New: Temporary pass by reference should not need copy ctor david dot lee at teracruz dot com
  2004-04-22 21:42 ` [Bug c++/15079] " pinskia at gcc dot gnu dot org
  2004-08-27  8:48 ` pinskia at gcc dot gnu dot org
@ 2004-08-27  8:51 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-27  8:51 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-27 08:48 -------
bug 12226.

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

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


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


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

end of thread, other threads:[~2004-08-27  8:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-22 21:38 [Bug c++/15079] New: Temporary pass by reference should not need copy ctor david dot lee at teracruz dot com
2004-04-22 21:42 ` [Bug c++/15079] " pinskia at gcc dot gnu dot org
2004-08-27  8:48 ` pinskia at gcc dot gnu dot org
2004-08-27  8:51 ` 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).