public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14463] New: copy constructor access checked when passing reference arg
@ 2004-03-06 19:27 arnej at europe dot yahoo-inc dot com
  2004-03-06 19:31 ` [Bug c++/14463] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: arnej at europe dot yahoo-inc dot com @ 2004-03-06 19:27 UTC (permalink / raw)
  To: gcc-bugs

gcc 3.4 snapshots currently have problems compiling packages like
cppunit.  I just checked snapshot 3.4.0 20040303 (prerelease)
and this problem is still there.
Here's a simplified example of the problem, I hope this i helpful.

// test code

class TestFailure {
private:
  TestFailure(const TestFailure &);
public:
  TestFailure(int *p);
};

void dummy(const TestFailure &failure);

void usingfunc(int *intp) {
  // this:
  { TestFailure foo(intp);
    dummy(foo);
  }
  // should be the same as this
  dummy( TestFailure(intp) );
}

produces this error:

t.cpp: In function `void usingfunc(int*)':
t.cpp:5: error: `TestFailure::TestFailure(const TestFailure&)' is private
t.cpp:18: error: within this context

Full output from gcc -v -c t.cpp:

Reading specs from /snapshot/lib/gcc/i386-unknown-freebsd4.9/3.4.0/specs
Configured with: ./configure --prefix=/snapshot
Thread model: posix
gcc version 3.4.0 20040303 (prerelease)
 /snapshot/libexec/gcc/i386-unknown-freebsd4.9/3.4.0/cc1plus -quiet -v t.cpp 
-quiet -dumpbase t.cpp -auxbase t -version -o /var/tmp//ccuJ8mOU.s
ignoring nonexistent directory "/snapshot/lib/gcc/i386-unknown-freebsd4.9/3.4.
0/../../../../i386-unknown-freebsd4.9/include"
#include "..." search starts here:
#include <...> search starts here:
 /snapshot/lib/gcc/i386-unknown-freebsd4.9/3.4.0/../../../../include/c++/3.4.0
 /snapshot/lib/gcc/i386-unknown-freebsd4.9/3.4.0/../../../../include/c++/3.4.
0/i386-unknown-freebsd4.9
 /snapshot/lib/gcc/i386-unknown-freebsd4.9/3.4.0/../../../../include/c++/3.4.
0/backward
 /usr/local/include
 /snapshot/include
 /snapshot/lib/gcc/i386-unknown-freebsd4.9/3.4.0/include
 /usr/include
End of search list.
GNU C++ version 3.4.0 20040303 (prerelease) (i386-unknown-freebsd4.9)
        compiled by GNU C version 2.95.4 20020320 [FreeBSD].
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=130534
t.cpp: In function `void usingfunc(int*)':
t.cpp:5: error: `TestFailure::TestFailure(const TestFailure&)' is private
t.cpp:18: error: within this context

-- 
           Summary: copy constructor access checked when passing reference
                    arg
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: arnej at europe dot yahoo-inc dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-unknown-freebsd4.9
  GCC host triplet: i386-unknown-freebsd4.9
GCC target triplet: i386-unknown-freebsd4.9


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


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

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-06 19:27 [Bug c++/14463] New: copy constructor access checked when passing reference arg arnej at europe dot yahoo-inc dot com
2004-03-06 19:31 ` [Bug c++/14463] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-03-07 15:16 ` giovannibajo at libero dot it
2004-08-27  8:47 ` pinskia at gcc dot gnu dot org
2004-08-27  8:48 ` 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).