This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/17227] New: Default copy constructor being created although never invoked


I have a test case where the compiler is trying to build a default copy ctor and failing because the class has an un-copyable member. However, the class is never copied. Adding an explicit copy ctor to the class makes the problem go away, and that ctor is never called either (all uses are by reference; it's not that the ctor is optimized away).

However, the case is big and complicated, so rather than put in the work of isolating the source code I'm first asking whether this is expected behavior: must a copy ctor be supplied when the compiler-built one is impossible, even if the ctor is never used? And if this actually is bogus, do you already have a bug report on it?

Ivan
Ivan

-- 
           Summary: Default copy constructor being created although never
                    invoked
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: igodard at pacbell dot net
                CC: gcc-bugs at gcc dot gnu dot org


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]